Command Line Flashcards

1
Q

What is a CLI?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a GUI?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

A
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the three virtues of a great programmer?

A

Laziness, impatience, hubris

How well did you know this?
1
Not at all
2
3
4
5
Perfectly