| CompSci 308 Fall 2019 |
Advanced Software Design and Implementation |
Knowledge of the Command Line is essential!
Useful Commands
ls list contents of a directory cd change the working directory cp copy files mv move files rm remove files (be careful — no UNDO!) mkdir make a directory grep look for strings in a file matching a given criteria diff report differences between files find find files matching a given criteria sort sort data based on variety of criteria tar compress/uncompress files man help page for a command Using arguments and wildcards can make these commands target specific types of data
cat output the contents of a file less page through a file head show the first lines in a file tail show the last lines in a file nano simple in shell text editor vi complex in shell text editor emacs complex in shell text editor
Working with the Filesystem
rm -r *" or especially "sudo rm -r /*"