Command Line Flashcards
What is a CLI?
Stands for Command Line Interface
processes commands to a computer program
What is a GUI?
Graphical User Interface
form of user interface that allows users to interact with electronic devices through graphical icons and audio indicators
GUIs were introduced because the perceived learning curve of CLIs was considered steep.
Give one use case for the “man” command:
“man” is an interface to the on-line reference manuals.
Give one use case for the “cat” command:
print contents of the files
Give one use case for the “ls” command:
list directory contents
list information about the FILEs
Give one use case for the “pwd” command:
to verify you are in the correct directory
prints name of current/working directory
Give one use case for the “echo” command:
display a line of text
like a console.log for the command line
Give one use case for the “touch” command:
create new files
Give one use case for the “mkdir” command:
make directories
Give one use case for the “mv” command:
move (rename) files
Give one use case for the “rm” command:
remove files or directories
Give one use case for the “cp” command:
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.