
Below is a collection of commands and functions used for managing files and folders in the terminal on Mac OS X.
Commands for managing files and directories in Terminal
cd
Change working directory of the Terminal.
ls
Find out which files and folders are in the current working directory.
pwd
Find out what your current working directory is.
mkdir
Create new directories on your Mac’s filesystem directly from the Terminal
rm
Remove files and directories on your Mac’s filesystem directly from the Terminal

cp
Copy files and directories on your Mac’s filesystem from the Terminal window
mv
ditto
A smart function to copy both files and folders to other locations on your computer.
This function can also extract files from a compressed archive (.zip, .tar) or copy files and folders to a new compressed archive.
Modify file and group permissions from the Terminal
How to manage file and directory permissions from the Terminal in Mac OS X: chmod, chgrp, chown.