Command line Flashcards
What is a CLI?
A command-line interface (CLI) processes commands to a computer program in the form of lines of text.
What is GUI?
The graphical user interface (GUI /ˌdʒiːjuːˈaɪ/ JEE-yoo-EYE[1][Note 1] or /ˈɡuːi/[2] GOO-ee) 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.
man
opens the manual
cat
prints the content of a file, and concatenate the files into one file.
cat laziness.txt impatience.txt hubris.txt > three-virtues.txt
ls
To see the list of files or folders
- a all the files
- F
pwd
- path to Print working directory
2. add a new file to the current working directory
echo
Add content to the file(could be new).
echo ‘Hello, World!’ > hello.txt
touch
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.
mv
Move or rename
mkdir
creates new directory
rm
removes file or directory
cp
copy
what are the three virtues of a 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.