command line Flashcards

1
Q

What is a CLI?

A
  • Command Line Interface

- processes commands to a computer program in the form of text

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
  • a form of user interface that allows user to interact with an electronic device through graphical icons/audio instead of text-based interface
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Give atleast one use case for each of the commands listed:

  • man
  • cat
  • ls
  • pwd
  • echo
  • touch
  • mkdir
  • mv
  • rm
  • cp
A

man - get a manual page for any of the commands (eg: man cat, man ls…)
cat - read, print, and concatenate the contents of a file
ls - list information about the files (the current directory by default)
pwd - prints the full filename of the current working directory
echo - displays a line of text (basically console.log for the terminal)
touch - change file timestamps (creates files)
mkdir - creates a directory(ies) if they don’t already exist
mv - move or rename files (rename SOURCE to DEST or move SOURCE(s) to DIRECTORY)
rm - remove files or directories - removes each specified file. removes directories with the -r option. (deletes file instantly - can’t undo!)
cp - copy files and directories. (use -r option to copy directories)

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
  1. 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.
  2. 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.
  3. Hubris: The quality that makes you write (and maintain) programs that other people won’t want to say bad things about.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly