2. Navigating the Filesystem Flashcards

1
Q

How do you browse through previously executed lines in the terminal?

A

By using the Up and Down Arrow keys.

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

How do you get the Shell to try to complete the line you’re typing?

A

By using the Tab key.

In Bash, if there are several options matching what you typed, you have to press it twice to display all matching options.

In Z Shell, if there are several options matching what you typed, they are displayed immediately when the Tab key is pressed. And then, you can press Tab repeatedly to select the one you want.

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

How do you print the path to your current location in Shell?

A

By executing the pwd command.

eg. pwd

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

What is pwd the abbreviation for?

A

Path to Working Directory

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

Where are all the home directories in Linux?

A

Under /Home.

eg. /Home/alican

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

Where are all the home directories in MacOS?

A

Under /Users.

eg. /Users/alican

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

Where is the root directory in MacOS and Linux?

A

At the / directory.

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

How do you navigate to the parent directory of the directory that you’re currently in?

A

By executing cd and passing it double dots (..).

eg. cd ..

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

How do you list the contents of the directory you’re currently in?

A

By executing the ls command.

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

Where are the essential, system programs that are available in your system located?

A

Inside the /bin directory.

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

What is the shortcut to navigate to your home directory?

A

cd.

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

How do you list all files in the current directory including the hidden files?

A

By executing the ls command with the -a flag.

eg. ls -a

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

How do you list all files in the current directory as well as information about them such as their owners, file sizes and last modification dates?

A

By executing the ls command with the -l flag.

eg. ls -l

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

How do you open the manual page for a command in the terminal?

A

By executing the man command with the command you want to view the manual page of.

eg. man cd

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

How do you move up and down in the manual page of a command?

A

You press SPACE to move down and B to move up.

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

How do you perform a search in the manual page of a command?

A

By pressing forward slash (/), typing the search term, and pressing enter.

17
Q

How do you list the content of the current directory sorted by time modified?

A

By executing the ls command with the -t flag.

eg. ls -t

18
Q

How do you exit the manual page?

A

By pressing Q.

19
Q

What is the first word of a line being executed in the shell?

A

The command.

20
Q

What is the anatomy of commands?

A

Commands are words seperated by spaces.

  1. The first word is the command itself.
  2. All the other words after the command are called arguments and they are passed to the command as information about what you do.
  3. A special kind of argument is an option, which usually starts with a dash (-). Options change the behavior of the command.