2.2 Basic File Commands Flashcards

1
Q

Characteristics of a Linux file system:

A

File system does not have a drive letter
Everything is considered as a file including directories and folders
The topmost directory is represented as ‘/’

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

What directory is the default directory when logging in to the terminal?

A

Home directory

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

What does ls -a do?

A

Lists all contents including hidden files and folders

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

What does ls -l do?

A

includes metadata

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

what does ls -h do?

A

Human readable file size, normally used together with -I

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

What does ls -d

A

list current directory, normally used with -l

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

what does ls -R

A

Recursive listing

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

What does ls -S do?

A

List sorted by size (Largest first)

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

What does ls -t do?

A

List sorted by modification timestamp (most recent first)

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

What are metacharacters?

A
  • Can be used to specify patterns to match filenames in a directory
  • Also referred to as “wildcards”
  • Are interpreted by the shells first before running a command
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What do these characters do?
- *
- ?
- []
- !

A

Represents zero or more of any character
Represents a single character
Represents range of characters
Used with [] to negate a range

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