File management in Unix Interview questions


Total available count: 13
Subject - Operating System
Subsubject - File management in Unix

What is 'inode'?

All UNIX files have its description stored in a structure called 'inode'. The inode contains info about the file-size, its location, time of last access, time of last modification, permission and so on. Directories are also represented as files and have an associated inode. In addition to descriptions about the file, the inode contains pointers to the data blocks of the file. If the file is large, inode has indirect pointer to a block of pointers to additional data blocks (this further aggregates for larger files). A block is typically 8k. Inode consists of the following fields,

  1. File owner identifier
  2. File type
  3. File access permissions
  4. File access times
  5. Number of links
  6. File size
  7. Location of the file data