command-line-basics Flashcards

1
Q

What is a CLI?

A

A software that processes commands to a computer program in the form of lines of text. The program which handles the interface is called a command-line interpreter or command-line processor.

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 (GUI) is 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 user interfaces, 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 each of the commands listed in this exercise.
man
cat
ls
pwd
echo
touch
mkdir
mv
rm
cp
A

man - It gives information on commands
cat - concatenate files and displays the output to the standard
ls - lists all files
pwd - It prints the current directory name with the complete path starting from root (/).
echo - outputs the strings it is being passed as arguments
touch - update the access date and/or modification date of a computer file or directory.
mkdir - create a new directory
mv - move a file
rm - remove/delete a file
cp - copy a file

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
  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