Sunday, 5 November 2017

INODES:


Definition: The inode is a data structure in a Unix-style file system that describes a filesystem object such as a file or a directory. Each inode stores the attributes and disk block location(s) of the object's data.
Disk inodes consist of the following fields:
  • ·   File owner identifier. Ownership is divided between an individual owner and a “group" owner and defines the set of users who have access rights to a file. The superuser bas access rights to all files in the systems.
  • File type. Files may be of type regular, directory, character or block special, or FIFO (pipes).
  • File access permissions. The system protects files according to three classes: the owner and the group owner of the file, and other users; each class bas access rights  to read, write and execute the file, which can be set individually. Because directories cannot be executed, execution perrnission for a directory gives the right to search the directory for a file name. 
  •  File access times, giving the time the file was last modified, when it was last accessed, and when the mode was last modified.
  •       Number of links to the file, representing the number of names the file has in the directory hierarchy.
  • Table of contents for the disk addresses of data in a file. Although users treat the data in a file as a logical stream of bytes, the kernel saves the data in discontiguous disk blocks. The Mode identifies the disk blocks that contain the file's data.
  • File size. Data in a file is addressable by the number of bytes from the beginning of the file, starting from byte offset 0, and the file size is 1 greater than the highest byte offset of data in the file. For example, if a user creates a file and writes only 1  byte of data at byte offset 1000 in the file, the size of the file is 1001 bytes.













No comments:

Post a Comment