What is inode number?

来源:互联网 发布:php 装饰者模式 编辑:程序博客网 时间:2024/06/06 04:14

本文转载至:http://www.networknuts.net/linux-interview-questions/

An inode is a data structure on a traditional Unix-style file system such as UFS or ext3 / ext4.
An inode stores basic information about a regular file, directory, or other file system object.
iNode number also called as index number, it consists following attributes:

  • File type (executable, block special etc)
  • Permissions (read, write etc)
  • Owner
  • Group
  • File Size
  • File access, change and modification time (remember UNIX or Linux never stores file
  • creation time, this is favorite question asked in UNIX/Linux sys admin job interview)
  • File deletion time
  • Number of links (soft/hard)
  • Extended attribute such as append only or no one can delete file including root user
  • (immutability)
  • Access Control List (ACLs)

Following command will be used to show inodes of file and folders:
ls -i
Following command will show complete info about any file or folders with inode number
stat file/folder


0 0