File: `/usr/bin/bash'
Size: 902036 Blocks: 1768 IO Block: 4096 regular file
Device: 808h/2056d Inode: 279026 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Context: system_u:object_r:shell_exec_t:s0
Access: 2013-05-01 13:59:45.680608666 +0800
Modify: 2013-01-31 22:47:10.000000000 +0800
Change: 2013-03-21 10:29:27.135450340 +0800
Birth: -
We can see that regular files have the following attributes:
- Size in bytes
- Device ID where the file is stored
- Inode number
- Link count
- User ID of the file
- Group ID of the file
- Permissions (access rights) of the file
- Timestamps on last access (atime), modify (mtime), and change (ctime)
- direct pointer,
- singly indirect pointer,
- doubly indirect pointer, and
- triply indirect pointer
One question remains: where is the file name stored? The answer is that it is stored in the content of the directory that contains the file. Unix/Linux directories are lists of association structures, each of which consists of one file name and one inode number for that file. That is why we need to specify (implicitly or explicitly) the path whenever we want to access a file in the file systems.
No comments:
Post a Comment