Command Line Flashcards

1
Q

What is a CLI?

A

Command-line interface: a text-based user interface (UI) used to run programs, manage computer files and interact with the computer.

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 UI that allows users to interact with electronic devices through graphical icons and audio indicators such as primary notation, instead of text-based UIs, types command labels or text navigation. Was introduced in reaction to the perceived steep learning curve of the CLIs.

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

man

A

man - an interface to the system reference manuals

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

cat

A

cat - concatenate files and print on the standard output

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

ls

A

ls - list directory content

  • a –all [do not ignore entries starting with .]
  • F –classify [append indicator (one of */=>@|) to entries]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

pwd

A

pwd - print name of current/working directory

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

echo

A

echo - display a line of text

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

touch

A

touch - change file timestamps

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

mkdir

A

mkdir - make directories

-p –parents [make parent directories as needed]

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

mv

A

mv - move (rename) files

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

rm

A

rm - remove files or directories

  • r -R –recursive [remove directories and their contents recursively]
  • f –force [ignore nonexistent files and arguments, never prompt]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

cp

A

cp - copy files and directories

-r -R –recursive [copy directories recursively]

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

history

A

history - GNU History Library

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
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