Command Line Basics Flashcards
What is a CLI? Command
Line Interface (text based application or operating system)
What is a GUI? Graphical
User Interface (image based application or operating system)
Give at least one use case for each of the commands listed in this exercise.
man
- an interface to the on-line reference manuals
man is the system’s manual pager. Each
page argument given to man is normally
the name of a program, utility or function.
“man man”
cat
concatenate files and print on the standard output
cat “file” (prints contents of file to screen)
ls
List information about the FILEs
ls -a (do not ignore entries starting with .)
pwd
print name of current/working directory
pwd > i-was-here.txt (write this file to current working directory)
echo
display a line of text - writes strings in text file
echo ‘Hello, World!’ > hello.txt
touch
change file timestamps
folder touch text adds file to folder
mkdir
make directories
mkdir
mv
move (rename) files
mv “file” (rename file)
rm
remove files or directories
rm -r “file” (remove file and all contents)
cp
copy files and directories
cp -r (copies files recursively)
What are the three virtues of a great programmer?
laziness, hubris and