Files Inodes
Files Inodes
.
• A file system is divided into 3 groups. The first group
consists of the block one which is called as super block. It
contains information about the particular file system.
Super I N O D E B L
block
O C K S
FILE ST O RA GE BL O C
KS
FILE
SYSTEM2
SUPER BLOCK
• Super block consists of the following information:
1. The size of the file system.
2. The number of blocks in the file system.
3. The number of free blocks.
4. The index of the next free block.
5. The size of the inode list.
6. The index of the next free inode.
Inode -& other blocks
• The second group consists of inode blocks.
Third and final portion of the file
• file System consists of blocks for storing
files themselves.
• Changing a file name or moving a file
doesnot change the inode number.
•
• A copy command creates another file.
Replicated or duplicated files can be created
by ‘ln’ - link command.
• $ln V.C newV.C
•
• $ls -l
• 3977 V.C
• 3977 newV.C
• ln command allows several different
names to indicate the same file. By giving
ln V.C newV.c the following things will
happen:
LINK COMMAND-INODES
• 1. The kernel names a new file “newV.C
in the directory entry with the inode number
of V.C.
• 2. In the inode table entry of “V.C” it makes
the number of links as 1(Note: an inode table
consists of one entry(column) that indicates
the number of links)
• When we say “rm newV.C”
• 1) it only deletes the file entry in the
directory.
• 2) It decrements the link field entry.