UNIX CHEAT SHEET

***BASIC COMMANDS***

+ Cancel a command
--> Ctrl-U, Ctrl-X or @

+ Change working directory to /usr
--> cd/usr

+ Change working dir to home dir
--> cd

+ Copy a file
--> cp [oldfile] [newfile]

+ Copy file to another directory
--> cp [oldfile] [dirname]

+ Copy several files to a directory
--> cp [file]* [dirname]

+ Copy all files and subdirectories
--> cp -r * /[newdir]

+ Erase a file
--> rm [filename]

+ Rename a file
--> mv [oldname] [newname]

+ Move file to another directory
--> mv [filename] [dirname]

+ List filenames
--> ls

+ List files with sizes and dates
--> ls -l

+ List hidden files
--> ls -al

+ List files and pause
--> ls | more

+ Look at a text file
--> cat [textfile]

+ Look at a long text file
--> more [textfile]

+ Make a symbolic link
--> ln [sourcefile] [linkname]

+ Make links for file in directory
--> ln [dirname]/* [newdir]

+ Combine two files
--> cat [file1] [file2] > [newfile]

+ Compare two files
--> diff [file1] [file2]

+ Manual for commands
--> man [command] | more

+ Change password
--> passwd

+ Current location path
--> pwd

+ To find a file
--> find . -name [filename] -print

+ Find a file with "X" in name
--> grep "X" *

+ Log out
--> exit
--> or Ctrl-D

**************************
Ver. 1.5
Adapted by Scott Andress
sandress@pilotmail.net
http://www.pilot.org
April 26, 1998
<+>