Week 7 - Assignment
Week 7 - Assignment
Assignment 7
Prerequisites
a) Boot up your CentOS Linux Box and open Terminal
Deliverables
A MS-Word file of all screenshots and Qs and Tasks, to be uploaded in Week7 DropBox
10 points total ( you lose one point for each wrong answer)
Due date: as written on Dropbox
Part1:
inode table:
a) inode table contains all the inodes, go to your home directory in terminal
b) Use the df -i command to see how many inodes are used and free?
Screenshot here
inode numbers:
g) Find out the inode number of each of the above files and directory using ls –li
(Screenshot here)
h) Has any file or dir same inode number? What it means having same inode number?
i) What information about a file stores in inode of a file? ( discussed in lecture)
j) Does the name of the file store in inode?
Rev 6.0 CST8207 Linux System Support - ©2021-22 – Algonquin College – By: Arsalan.
CST8207_Linux System Support Algonquin College
Assignment 7
The “ . “ refers to current directory and has an inode. This inode must be equal to inode of W7
directory. In next step, we will verify it using ls -ali
l) Find out what is the inode number of “.“ in W7 directory? What is the inode of W7
directory? screen shot here
Part 2
Fill the table below with inode numbers of items in the “name” column:
Rev 6.0 CST8207 Linux System Support - ©2021-22 – Algonquin College – By: Arsalan.
CST8207_Linux System Support Algonquin College
Assignment 7
g) Can you create a hard link to a directory? If yes, How? If not, why?
k) Use the find command to list hard/soft linked files in your W7 directory using :
$ find . -inum inode_number_of_the_file_from_table_in_part2
Note: Searching for inode of the file helps to find same file contents with different filenames
Part 3
a) Using rm command you can delete hard link and soft link, delete the SL_f3 and
HL_f2 (screen shot of successfully deleted here)
b) Discover how you could possibly List all files inside your home directory that have
more than one hard link, and write the command and add output screenshot here (hint:
use find command)
c) At the end, move the content of your W7 into Week7 directory and then remove W7 directory.
Write the commands you used here.
Rev 6.0 CST8207 Linux System Support - ©2021-22 – Algonquin College – By: Arsalan.