command-line-basics Flashcards
What is a CLI?
A software that 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 (GUI) 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 - It gives information on commands
cat - concatenate files and displays the output to the standard
ls - lists all files
pwd - It prints the current directory name with the complete path starting from root (/).
echo - outputs the strings it is being passed as arguments
touch - update the access date and/or modification date of a computer file or directory.
mkdir - create a new directory
mv - move a file
rm - remove/delete a file
cp - copy a file
What are the three virtues of a great programmer?
- 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.
- 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.
- Hubris: The quality that makes you write (and maintain) programs that other people won’t want to say bad things about.