Workbook 5: The Linux Filesystem: Chapter 1: File Details Flashcards

1
Q

What are the three structures associated with every Linux file?

A

1) dentry
2) inode
3) data [5]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What pieces of metadata are found in an inode

A
File type
Permissions
User ID Group ID
Access Time
Modified Time
Change Time [5]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a dentry?

A

Filename [5]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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?

A

(i) -
(ii) l
(iii) d
(iv) b
(v) c [6]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What three timestamps are stored in an inode?

A

1) atime
2) ctime
3) mtime [8]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

When does a file’s atime change?

A

Updates whenever the file’s data is read

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the difference between a file’s ctime and mtime?

A

ctime: Updates whenever the file’s inode information
changes

mtime: Updates whenever the file’s data changes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Where is a file’s creation time stored in Linux?

A

It does not store anywhere

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the difference between a file’s size and its length?

A

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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does the second field in a long listing represent?

A

Link count [10]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What two commands display the metadata stored in an inode?

A

stat command

ls -l command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the difference between the –r and the –R options of the ls command?

A
  • r reverse

- R recursive [10]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Write a command line that outputs a directory’s contents in order of modification time.

A

ls -lt [12]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does the ls command’s –h and –F options do?

A
  • h Use “human readable” abbreviations when reporting file lengths.
  • F Decorate filenames with one of *, /, =, @, or | to indicate file type.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Using an ls command option, give a command line that outputs the inode of a directory’s files

A

ls -i [10]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly