1.7 Directories Flashcards

2
Q

What is the shortcut to move directly to the home directory when using the cd command?

A

”~”

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

What is the difference in function between the rm command and the rmdir command?

A

The rmdir comand removes empty directories only. The rm command removes file and directory inodes without deleting the data.

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

What are the two different kinds of paths?

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

Which symbols represent the current and parent directory?

A
  • Current: .
  • Parent: ..
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which symbol represents the user’s home directory?

A

”~”

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

Which command creates a blank, empty file?

A

touch

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

What does the pwd command do?

A

Displays the present working directory.

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

What does the cd command do?

A

Changes the present working directory.

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

What does the ls command do?

A

Displays the contents of a directory. Options include:

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

What does the ls -a command do?

A

ls -a displays all directory contents, including hidden content.

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

What does the ls -l command do?

A

ls -l displays a long listing for directory contents, including the owner, modified date, size, and permissions.

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

What does the ls -R command do?

A

ls -R displays the contents of the directory and all sub-directories.

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

What does the ls -d command do?

A

ls -d displays directories but not files.

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

What does the ls -r command do?

A

ls -r displays the contents of a directory, reversing the sort order.

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

What does the mkdir command do?

A

Creates a new directory

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

What does the mkdir -p command do?

A

Creates a new directory and creates any intermediate directories that do not exist.

18
Q

What does the cp command do?

A

Copies files, leaving originals unchanged.

19
Q

What does the cp -R (or cp -r) command do?

A

Copies files or copies directories recursively (the directory and everything in it)

20
Q

What does the mv command do?

A

Moves or renames files and directories. Moving directories erases the source directory and places it in the destination.

21
Q

What does the mv -f command do?

A

Moves or renames files and directories, overwriting files and directories that exist in the destination directory.

22
Q

What does the mv -i command do?

A

Moves or renames files and directories, prompting before overwriting files and directories in the destionation directory.

23
Q

What does the mv -n command do?

A

Moves or renames files and directories, never overwriting files and directories in the destionation directory.

24
Q

What does the rmdir command do?

A

Deletes an empty directory.

25
Q

What does the rm command do?

A

Removes file and directory inodes, but does not actually delete the data.

26
Q

What does the rm -r command do?

A

Removes file and directory inodes. For directories, recursively deletes the directory and everything in it.

27
Q

What does the rm -f command do?

A

Removes file and directory inodes without prompting for confirmation.