Unix commands 101

Some basic Unix/Linux commands that are also helpful on OS X’s Terminal.

‘ls’ lists the contents of a directory

ls‘cd’ change directory (go into a directory)

cd [directory name]‘mv’ move a file or directory

mv [directory] [new/location]‘rm’ remove a file or directory (directory must be empty)

rm [fileToDelete]‘rm -rf’ remove a directory AND it’s contents (without confirmation)

rm -rf [aDirecotyFullofStuff]

‘du -s -k’ get the size of a directory in KBytes

du -s -k [aDirecotry]

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image