Workbook 5 Flashcards
What are the three structures associated with every Linux file?
Dentry, Inode, Data. [5/6]
What pieces of metadata are found in an inode?
The files metadata. [5/5]
What is a dentry?
The filename. [5/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?
Regular Files: - (dash) Symbolic Link: l (lowercase L) Directory: d (lowercase D) Block Device Node: b (lowercase B) Character Device Node: c (lowercase C) [5/6]
What three timestamps are stored in an inode?
atime: Updates whenever the file’s data is read.
ctime: Updates whenever the file’s inode information changes.
mtime: Updates whenever the file’s data changes. [5/8]
When does a file’s atime change?
Updates whenever the file’s data is read. [5/8]
What is the difference between a file’s ctime and mtime?
ctime updates whenever the file’s data is read.
mtime updates whenever the file’s data changes. [5/8]
Where is a file’s creation time stored in Linux?
Linux doesn’t store an initial point of creation time for files. [5/8]
What is the difference between a file’s size and its length?
Length is how large the file is in bytes.
Size is the amount of disk space the file consumes. [5/8]
What two commands display the metadata stored in an inode?
ls and stat [5/9]
What is the difference between the –r and the –R options of the ls command?
- r (lower case): Reverses the sorting order.
- R (upper case): Lists the subdirectories as well. [5/10]
Write a command line that outputs /etc’s contents in order of modification time.
ls /etc -t [5/10]
What does the ls command’s –h and –F options do?
- h: “Human Readable” mode uses abbreviations when reporting file lengths.
- F: Decorates filenames with symbols to indicate file type. [5/10]
Using an ls command option, give a command line that outputs the inode of /etc’s files.
ls /etc -i [5/10]
What is a hard link and why would you create one?
Multiple Dentries are assigned to a single inode as you can exist in two places or have two names. [5/17]