QUICK UNIX REFERENCE ________________________________________________________________________ Files and Directories _____________________ ls = list files in directory pwd = your present working directory cd = change directory rm = remove file(s) mv = move file(s) cp = copy file(s) mkdir = make a new directory under this one rmdir = remove an empty directory chmod = change permissions for reading, writing, or executing files more = page through a file tail = see the final lines of a file sort = sort the lines in a file in some order diff = compare two files and show the differences grep = look for a pattern in a file tar = make an archive file or extract files from an archive Important Software __________________ firefox = start web browser (best currently in UNIX) konqueror = start a Windows-type file manager for copying, etc. nano = start a text editor (open and edit a file) pine = start an e-mail tool cl = run IRAF (run this command from your IRAF directory) ! = run UNIX command within IRAF Disk Usage __________ du = how much disk space is this directory taking up df = how much of the disk is full Remote ______ ssh = login to another computer using a Secure Shell scp = copy files to another computer in a secure way sftp = "put" or "get" files on another computer in a secure way ping = check to see whether another computer is alive and well System and Processes ____________________ top = show the programs using the most CPU ps = report the status of an executing programs kill -9 = kill an executing program (without mercy!) nice = run a program at lower priority (i.e. don't hog the computer's CPU) alias = set up an alternate name for a command (e.g. alias rm 'rm -i' ) fg = bring to foreground Printing ________ lpr = print file (e.g. "lpr -Pps256" for the computer room) lpq = check status of print jobs lprm = remove a print job from the queue Special Characters __________________ ~ = home directory . = current directory .. = up one directory level * = wildcard of any length ? = wildcard of one character Tab = complete the command or file name > = redirect output into a file >> = append output at end of an exisiting file < = use a file as input rather than keyboard | = "pipe" = use the output of one command as input into another & = run in the background (Ctrl) commands _________________________ ^c = kill a program while it is running ^z = put in background ( ^ means the key) ^s = suspend output ( ^ means the key) ^q = restart output ^a = go to start of line ^e = go to end of line ^k = kill a line Programming & Executing _______________________ f77 or g77 = compile a Fortan program cc or gcc = compile a C program Miscellaneous __________________________ man = see documentation for a Unix command wc = tells the number of words or lines in a file passwd = change password which = tells where the executable file for a program resides gzip = compresses file (creates .gz file) gunzip = uncompresses .gz file gv = view a .ps or .pdf file acroread = view a .pdf file