3.1 How Sweet is Terminal Flashcards

1
Q

We are used to ______________, with their familiar icons, windows, buttons, and mouse pointers.

A

We are used to Graphical User Interfaces (GUIs), with their familiar icons, windows, buttons, and mouse pointers.

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

Using the command line is a critical skill. At different times, it may be:

A
  1. The only way to achieve a desired outcome. You may have to work with systems and tools that have no GUI interface.
  2. The fastest way to achieve a desired outcome.
  3. The most flexible way to achieve a desired outcome.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Virtual machines are programs that simulate ______________.

A

Virtual machines are programs that simulate entire computers.

  • Virtual machines (VMs) can operate as entirely different computers than the one they are running on.
  • We can run many different VMs on a single physical computer.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

pwd

A

Display the current working directory (print working directory).

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

ls

A

List directories and files in the current directory.

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

cd

A

Navigate into a directory (change directory).

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

mkdir

A

Make a directory

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

rmdir

A

Remove directory

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

touch

A

Create an empty file

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

rm

A

Remove a file

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

clear

A

clear history

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

There are two types of file paths: _________ paths and _________ paths.

A

There are two types of file paths: absolute paths and relative paths.

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

What’s the difference between absolute and relative paths?

A

An absolute or full path points to the same location in a file system, regardless of the current working directory. To do that, it must include the root directory. By contrast, a relative path starts from some given working directory, avoiding the need to provide the full absolute path.

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

A _____________, starts at your current location in the directory and doesn’t require typing out the top directory.

A

A relative path, starts at your current location in the directory and doesn’t require typing out the top directory.

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

cd . . and cd . ./ . ./ does what

A

Move back a directory or multiple directories

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

What does each of these do?

  1. file path
  2. absolute path
  3. relative path
  4. cp
  5. mv
A
  1. Identifies a unique location in a file system.
  2. Starts at the top directory of the file system.
  3. Begins from the current directory.
  4. Copies files
  5. Moves files
17
Q

What does this command do?

more

A

View a file page-by-page. Space bar moves you to the next page.

18
Q

What does this command do?

less

A

Similar to more, but allows you to scroll up and down a file.

19
Q

What will this command do?

head -40 file1.txt

A

Shows the first 40 lines of file1.txt

Used after head or tail to change the number of lines previewed.

20
Q

True or False?

Cat combines files and displays the results.

A

True

Cat command stand for concatenate and combine files together.

21
Q

To save the results of cat, you have to use either ____ or _____.

A

To save the results of cat, you have to use either > or&raquo_space;

> Write to a file, overwriting the file if the file name already exists.

> > Write to a file, appending the file if the file name already exists.

22
Q

The most common data streams are ________ and ________.

A

The most common data streams are stdin and stdout.

23
Q

What does the head and tail commands do?

A

head and tail preview 10 lines by default. This number can be changed easily.

head -50 examplefile.txt