Home › Forums › Linux Questions & Answers.. › Filesystem .. › [File System] What is an inode
Tagged: inode filesysem metadata stat
- This topic has 2 replies, 1 voice, and was last updated 10 years, 2 months ago by Humble.
-
AuthorPosts
-
HumbleKeymaster
Can you explain “inode” in linux ?
HumbleKeymasterWell.. I can give some idea about inodes..
Obviously this comes under filsystems.. In simple terms filesystems are where the files and directories are structured.. Isnt it? .. When we think about filesystems there are mainly 2 parts..1) The data and 2) The metadata..
What I mean by metadata ? metadata is the data about the data..
Lets take a “file” as an example.. The information about this file can be treated as metadata.. but whats that ?
*) File modification data
*) Owner of the file
*) File permission ..etcI can show an example of a file called “foo.bar” from my filesystem and some information about it.
[hchiramm@humbles-lap ~]$ stat foo.bar File: ‘foo.bar’ Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: 809h/2057d Inode: 9443948 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 1000/hchiramm) Gid: ( 1000/hchiramm) Context: unconfined_u:object_r:user_home_t:s0 Access: 2013-07-14 17:35:05.996075662 +0530 Modify: 2013-07-14 17:35:00.799979118 +0530 Change: 2013-07-14 17:35:00.799979118 +0530 Birth: - Inodes store this metadata information and typically they also store information about where the data is located on the storage media. Inodes are represented as an integer called inode number. In above example, the inode number of the file is "9443948 ".. Each file and directory in a filesystem is associated with an inode.. Also refer #http://en.wikipedia.org/wiki/Inode
HumbleKeymaster[root@humbles-lap]# ls -li foo.bar 9443948 -rw-rw-r--. 1 hchiramm hchiramm 0 Jul 14 2013 foo.bar [root@humbles-lap ]# You can use ls command as shown above to list INODE of a file..
-
AuthorPosts