SSH Commands

Below a list of some of the more commonly used SSH commands. Most UNIX commands have many options and parameters which are not listed here. For more complete information on using UNIX commands, you can refer to the online manual by typing man [command] at the UNIX prompt, where "[command]" represents the command you would like more information about. Other UNIX help commands you can type are [command] -? and [command] --help.

Example: man ls
This would bring up the help documentation for the "LS" command.

Note: When something is specified in brackets, such as [command] or [filename], it is used to indicate that you must input your desired information here. Do NOT include brackets in your command.

Navigating in UNIX

pwd Shows the full path of the current directory
ls Lists all the files in the current directory
ls -al Lists all files and information
ls –alR Lists all files and information in all subdirectories
ls -alR | more Same as ls –alR, pausing when screen becomes full
ls -alR > filename.txt Same as ls –alR, outputs the results to a file
ls *.html Lists all files ending with .html
cd [directory name] Changes to a new directory
cd .. Changes to directory above current one
clear Clears the screen
vdir Gives a more detailed listing than the "ls" command
exit Log off your shell
 
Moving, Copying and Deleting Files
 
mv [old filename] [new filename] Move/rename a file
cp [filename] [new filename] Copies a file
rm [filename] Deletes a file
rm * Deletes all files in current directory
rm *.html Deletes all files ending in .html
 
Creating, Moving, Copying and Deleting Directories
 
mkdir [directory name] Creates a new directory
ls -d */ Lists all directories within current directory
cp -r [directory] [new directory] Copies a directory and all files/directories in it