command-line-basics Flashcards

1
Q

What is a CLI?

A

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.

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 user interfaces, typed command labels or text navigation.

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
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.

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