Command Line Flashcards
What is a CLI?
Command Line Interface. It receives commands from a user in the form of lines of text which provides a means of setting parameters for the environment, invoking executables, and providing information to them as to what actions they are to perform. Runs in a terminal and you type lines at it. CLI for a specific program.
What is a GUI?
Graphical User Interface. 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 UIs, typed command labels, or text navigation.
Give at least one use case for man
When you need to know more about how to use a command.
Give at least one use case for cat
When you want to see the text of a file in the terminal.
Give at least one use case for ls
When you want to see the files in a directory.
Give at least one use case for pwd
When you want to see what directory you’re working on.
Give at least one use case for echo
When you want to put the text you write into a new file.
Give at least one use case for touch
When you want to create a new file.
Give at least one use case for mkdir
When you want to create a new directory or a new folder.
Give at least one use case for mv
When you want to move or rename a file.
Give at least one use case for rm
When you want to delete a file.
Give at least one use case for cp
When you want to copy files for use.
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.