CompSci 308 Spring 2024 |
Advanced Software Design and Implementation |
Unix was not designed to stop people from doing stupid things, because that would also stop them from doing clever things. — Doug Gwyn
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, wildcards, and expansions are powerful ways to 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
rm -r *
" or especially "sudo rm -r /*
"