Command Line Flashcards
What is a CLI?
A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and providing information to them as to what actions they are to perform.
What is a GUI?
graphical user interface, is 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. GUIs were introduced in reaction to the perceived steep learning curve of CLIs (command-line interfaces),[3][4][5] which require commands to be typed on a computer keyboard.
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: man is an interface to the on-line reference manuals. man is the system’s manual pager.
- cat: concatenate files and print on the standard output
- ls: list directory contents. List information about the FILES (the current directory by default).
- pwd: print name of current/working directory. Prints 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.
- mkdir: make directories. Create the DIRECTORY(ies), if they do not already exist. Mandatory arguments to long options are mandatory for short options too.
- mv: move (rename) files. Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
- rm: remove files or directories. This manual page documents the GNU version of rm. rm removes each specified file. By default, it does not remove directories.
- cp: copy files and directories. Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
Mandatory arguments to long options are mandatory for short options too.
- history: GNU History Library. Many programs read input from the user a line at a time. The GNU History library is able to keep track of those lines, associate arbitrary data with each line, and utilize information from previous lines in composing new ones.
What are the three virtues of a great programmer?
Laziness, impatience, hubris