Home || Syllabus || Class Notes || Assignments || Resources || Tutoring


Summary of Unix Commands for Mac-OS users (Mac Unix) - Fall, 2009

cd <directory name>
cd..

change directory (e.g. cd pictures brings you to the sub-directory "pictures")
change directory up one level to the parent directory
chmod
modifies the permissions on a directory

cp <current filename> <new file name>

cp -i <current filename> <new file name>

copy (e.g. cp cats1.jpg cats2.jpg makes a copy of the picture "cats1.jpg" and calls it "cats2.jpg")

Use cp -i to be prompted before over-writing another file. This is a "safer" method!

ls
ls -l
ls -a
lists a directory of your files
lists a directory with more information about the files
lists a directory including the hidden files
man
This is the on-line Unix help documentation (as in "manual"). Type "man" + the command (e.g. "man ls") for a detailed explanation of the command.
mkdir <directory name>
creates a new directory (e.g. mkdir pictures creates a directory called "pictures")
pico
use pico <filename> to edit a text file
pwd
see the current directory and path
rm <filename>
remove (or delete) a file (e.g. rm cats1.jpg deletes the file "cats1.jpg")
rmdir <directory name>
removes an empty directory (e.g. rmdir pictures removes a directory called "pictures" as long as that directory is empty)

Note: Use the control key + c to cancel what you are currently doing. It will show up on the screen as ^C.

For further information on Unix :