command-line-basics Flashcards
What is a CLI?
Stands for command-line interface. It accepts text input to execute operating system functions.
What is a GUI?
Stands for graphical user interface. It is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicators instead of text-based UIs, typed command, labels, or text navigation
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
man: an interface to the online reference manuals; system manual pager
Cat: concatenate files and print on the standard output
Ls: list information about the files (the current directory by default)
Pwd: print the full filename of the current working directory
Echo: display a line of text; echo the string(s) to standard output
Touch: change file timestamps; update the access and modification times of each file to the current time; creates file if it does not exist
Mkdir: make directories if they do not already exist
Mv: move or rename files
Rm: remove files or directories
Cp: copy files and directories
What are the three virtues of a great programmer?
- 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.