Command-Line-Basics Flashcards

1
Q

What is a CLI?

A

A CLI is a command line interface which allows users to input commands 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

A graphical user interface is a form of user interface that allows users to interact with electronic devices through graphical icons

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

Give at least one use case for each of the commands listed in this exercise.
man
cat
ls
pwd
echo
touch
mkdir
mv
rm
cp

A

man - an interface to the online reference manual. If you need to know what a specific command does you can look it up using the man command.

cat - outputs the content of a file. If you wanted to preview what content is in a .txt file. You can access the content using cat

ls - list directory contents. If you wanted to view a list of files within a folder use ls.

pwd - displays path of current working directory. If you wanted to know the location of the current directory.

echo - The echo command is used to show messages, most commonly from within script or batch files. You can store echo messages to a new file.

touch - update file access and modification time

mkdir - creates new directories.

mv - move files to directories
rm - deletes file

cp - copy files to directories

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