command line Flashcards
What is a CLI?
- Command Line Interface
- processes commands to a computer program in the form of text
What is a GUI?
- Graphical User Interface
- a form of user interface that allows user to interact with an electronic device through graphical icons/audio instead of text-based interface
Give atleast one use case for each of the commands listed:
- man
- cat
- ls
- pwd
- echo
- touch
- mkdir
- mv
- rm
- cp
man - get a manual page for any of the commands (eg: man cat, man ls…)
cat - read, print, and concatenate the contents of a file
ls - list information about the files (the current directory by default)
pwd - prints the full filename of the current working directory
echo - displays a line of text (basically console.log for the terminal)
touch - change file timestamps (creates files)
mkdir - creates a directory(ies) if they don’t already exist
mv - move or rename files (rename SOURCE to DEST or move SOURCE(s) to DIRECTORY)
rm - remove files or directories - removes each specified file. removes directories with the -r option. (deletes file instantly - can’t undo!)
cp - copy files and directories. (use -r option to copy 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.