command-line-basics Flashcards
What is a CLI?
Command-line interface processes commands to a computer program in the form of lines of text. The program which handles the interface is called a command-line interpreter or command-line processor.
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 user interfaces, typed command labels or text navigation.
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
open the user manual
man ls
Display the manual page for the item (program) ls.
**cat filename
print the contents of files.
**ls
list information about the files.
ls -a list all, do not ignore entries starting with .(dot)
-F append indicator(one of */=>@|) to entries
**pwd - print name of current/working directory
** echo - display a line of text
**touch - change file timestamps, create new file
**mkdir - make(create) directories
-p, –parents
no error if existing, make parent directories as needed
**mv - move (rename) files (source dest)
**rm - remove files or directories
rm -r remove dir and its files recursively
**cp - copy files and directories
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
**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 com‐
posing new ones.
What are the three virtues of a great programmer?
laziness, impatience, hubris