What is inode number ?

Open Source forum

What is inode number ?

Postby John » Fri Jan 17, 2014 7:32 pm

What is inode number ?
John Abraham
John
 
Posts: 419
Joined: Wed Jun 05, 2013 9:15 pm

Re: What is inode number ?

Postby John » Fri Jan 17, 2014 7:32 pm

An inode is a data structure on a traditional Unix-style file system such as UFS or ext3. 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
Files/Folders can also be deleted using inode numbers with following command:

find out the inode number using 'ls -il' command then run below command
find . -inum inode_number -exec rm -i {} \;
John Abraham
John
 
Posts: 419
Joined: Wed Jun 05, 2013 9:15 pm


Return to Open Source

cron