nt such as files and directories. It stores the file content in BLOBs – binary large objects. The folders are represented as trees. Each tree contains other trees (subfolders) and BLOBs along with a simple text file which consists of the mode, type, name and Secure Hash Algorithm of each blob and subtree entry. During repository transfers, even if there are several files with the same content and different names, the GIT software will transfer the BLOB once and then expand it to the different files.
Ques 15. What is inode ? Briefly explain the structure ?
Ans : Inode is a data structure that keeps track of all the information about a file. When we keep our information in a file and the OS stores the information about a file in an inode. Information about files is sometimes called metadata. We can say that an inode is metadata of the data. In a file system, inodes consist roughly of 1% of the total disk space, whether it is a whole storage unit or a partition on a storage unit. The inode space is used to ?track? the files stored on the hard disk. The inode entries store metadata about each file, directory or object, but only points to these structures rather than storing the data. Each entry is 128 bytes in size. The metadata contained about each structure can include the following:
Access Control List (ACL)
Direct/indirect disk blocks
Number of blocks
File access, change and modification time
File deletion time
File generation number
Number of links
Inode structure of a directory consists of a name to inode mapping of files and directories in that directory.In a directory, You can find the inode number corresponding to the files using the command “ls -i”
#ls -i 786727 -rw------- 1 root root 4226530 May 29 13:17 sudo.log 786437 -rw-------. 1 root root 32640 Jun 23 20:11 tallylog 786440 -rw-rw-r--. 1 root utmp 276096 Jul 20 06:45 wtmp 786741 -rw------- 1 root root 9653 Jul 17 09:38 yum.log
Similar way, the number of inodes allocated, used and free in a Filesystem can be listed using “df -i” command
# df -i /root Filesystem Inodes IUsed IFree IUse% Mounted on /dev/mapper/RootVol-lvmroot 524288 80200 444088 16%