Command Line Flashcards

1
Q

What is a CLI?

A

Stands for Command Line Interface

processes commands to a computer 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

form of user interface that allows users to interact with electronic devices through graphical icons and audio indicators

GUIs were introduced because the perceived learning curve of CLIs was considered steep.

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

Give one use case for the “man” command:

A

“man” is an interface to the on-line reference manuals.

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

Give one use case for the “cat” command:

A

print contents of the files

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

Give one use case for the “ls” command:

A

list directory contents

list information about the FILEs

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

Give one use case for the “pwd” command:

A

to verify you are in the correct directory

prints name of current/working directory

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

Give one use case for the “echo” command:

A

display a line of text

like a console.log for the command line

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

Give one use case for the “touch” command:

A

create new files

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

Give one use case for the “mkdir” command:

A

make directories

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

Give one use case for the “mv” command:

A

move (rename) files

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

Give one use case for the “rm” command:

A

remove files or directories

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

Give one use case for the “cp” command:

A

copy files and directories

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