command-line-basics Flashcards

1
Q

What is a CLI?

A

Command-line interfaces; using the command-line to perform tasks in computer. Processes commands to computer program in form of text.

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; allows users to interact with devices through graphics instead of text-based

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 - when you want to read the instructions of a certain command (manual)

cat - when you want to concatenate files and print/read the content(s) in the file

ls - when you want to see the list of contents in a certain directory

pwd - when you want to print the name of current/working directory

echo - when you want to display a line of text and maybe write it to a new file

touch - when you want to change the file timestamp; update the access and modification times of each file to current time

mkdir - when you want to make directories

mv - when you want to rename/move files

rm - when you want to remove files/directories

cp - when you want to copy files and 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, impatience, and hubris

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