CLI Flashcards

1
Q

What is a CLI?

A

Command-line interface

An interface where users interact with a device via lines of text

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

What is a GUI?

A

Graphic User Interface

An interface for users to interact with the technology/computer, in a more simplified manner

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

CLI man

A

Manual page (man commend: opens a manual for that specific command)

If I’m unsure what a specific command does, I can look at the manual of the command

Exp: man cat

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

CLI cat

A

Displays the text of a file or concatenates the text, dispensing on the command.

This command can be used to take the text content of two or more files, and saved the text together, in a new file

Exp: cat laziness.txt impatience.txt hubris.txt > three-virtues.txt

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

CLI ls

A

You can view all the items inside a directory. If no pathway if given, it shows the content of the current directory

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

CLI pwd

A

Prints the current directory you are in. along with the entire pathway.

You can use this to find yourself in your code and mark where you have been

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

CLI echo

A

You can use this to print text or save text to a new document.

Exp: echo ‘Hello, World!’ > hello.txt

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

CLI touch

A

A command used to create or update timestamps of the last edited

It can be used to create documents as well if it doesn’t exist

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

CLI mkdir

A

Creates a directory, if the name of the directory is not already in use, in the specified location

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

CLI mv

A

Moved something to another directory

You can use this to rename a directory, if the first destination directory does not exist

Exp: put pokemon into pokemon: mv pokiemans/ pokemon/

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

CLI rm

A

Removed a document PERMENANTLY, but not a directory

rm -r will remove a directory

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

CLI cp

A

Copies a document and allows you to give it a name

Exp: cp and-then.txt copy-and-then.txt

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

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.

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.

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