Workbook 5: The Linux Filesystem: Chapter 1: File Details Flashcards
What are the three structures associated with every Linux file?
1) dentry
2) inode
3) data [5]
What pieces of metadata are found in an inode
File type Permissions User ID Group ID Access Time Modified Time Change Time [5]
What is a dentry?
Filename [5]
What character abbreviation does the ls command use to identify
(i) a regular file,
(ii) a symbolic link,
(iii) a directory,
(iv) a block device node,
(v) a character device node?
(i) -
(ii) l
(iii) d
(iv) b
(v) c [6]
What three timestamps are stored in an inode?
1) atime
2) ctime
3) mtime [8]
When does a file’s atime change?
Updates whenever the file’s data is read
What is the difference between a file’s ctime and mtime?
ctime: Updates whenever the file’s inode information
changes
mtime: Updates whenever the file’s data changes
Where is a file’s creation time stored in Linux?
It does not store anywhere
What is the difference between a file’s size and its length?
The file’s length (which is the actual number of bytes of data), and the file’s size (which is the amount of disk space the file consumes)
What does the second field in a long listing represent?
Link count [10]
What two commands display the metadata stored in an inode?
stat command
ls -l command
What is the difference between the –r and the –R options of the ls command?
- r reverse
- R recursive [10]
Write a command line that outputs a directory’s contents in order of modification time.
ls -lt [12]
What does the ls command’s –h and –F options do?
- h Use “human readable” abbreviations when reporting file lengths.
- F Decorate filenames with one of *, /, =, @, or | to indicate file type.
Using an ls command option, give a command line that outputs the inode of a directory’s files
ls -i [10]