2.3 Using Directories and Listing Files - Part 2 Flashcards

1
Q

Which directory in a normal file system of Linux would you expect to find basic command file?

A

/bin

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

Which directory in a normal Linux file system would you expect to find system configuration files?

A

/etc

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

Which directory in a normal Linux file system would you expect to find system log files?

A

/var

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

What does the “ls” command in Linux do?

What are some common options used with the “ls” command?

A

The “ls” command prints a list to the screen of all files and directories that are not hidden files

Options

-l creates a “long list” which shows permissions, ownership, size, modification date, and name

-h makes the list human readable
-d shows directories but not their contents
-d */ shows only subdirectories without files
-lt shows long list sorted by modification time (oldest files first)
-lrt shows long list with modification time reversed (newest files first)
-ls -lX long list and group all files by type
ls -S sorts by file size
ls -R displays a recursive list

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