Command Line Flashcards

1
Q

What is a CLI?

A

Command Line Interface. It receives commands from a user in the form of lines of text which provides a means of setting parameters for the environment, invoking executables, and providing information to them as to what actions they are to perform. Runs in a terminal and you type lines at it. CLI for a specific program.

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

What is a GUI?

A

Graphical User Interface. A form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, instead of text-based UIs, typed command labels, or text navigation.

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

Give at least one use case for man

A

When you need to know more about how to use a command.

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

Give at least one use case for cat

A

When you want to see the text of a file in the terminal.

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

Give at least one use case for ls

A

When you want to see the files in a directory.

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

Give at least one use case for pwd

A

When you want to see what directory you’re working on.

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

Give at least one use case for echo

A

When you want to put the text you write into a new file.

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

Give at least one use case for touch

A

When you want to create a new file.

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

Give at least one use case for mkdir

A

When you want to create a new directory or a new folder.

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

Give at least one use case for mv

A

When you want to move or rename a file.

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

Give at least one use case for rm

A

When you want to delete a file.

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

Give at least one use case for cp

A

When you want to copy files for use.

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

What are the three virtues of a great programmer?

A
  1. Laziness: The quality that makes you go to great effort to reduce overall energy expenditure. It makes you write labor-saving programs that other people will find useful and document what you wrote so you don’t have to answer so many questions about it.
  2. Impatience: The anger you feel when the computer is being lazy. This makes you write programs that don’t just react to your needs, but actually anticipate them. Or at least pretend to.
  3. Hubris: The quality that makes you write (and maintain) programs that other people won’t want to say bad things about.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly