UNIX survival guide

Here are a few essential UNIX commands. For more information on any given command, type "man command-name" or use the "Help" tool on your desktop.

Moving around the
UNIX file system
pwd print working directory
cd change directory
mkdir make directory
rmdir remove directory
ls list contents of directory
cp copy a file
mv move (rename) a file
rm remove (delete) a file
cat display contents of a file
more (less) display contents of a file, page by page
head (tail) -N display first (last) N lines of a file
Special directories
. current working directory
.. next directory up
~ home (login) directory
~user home directory of "user"
Wild cards
* match any character string
? match any single character
[ab] a or b
[1-5] 1, 2, 3, 4, or 5
Redirection
> file redirect stdout to a file
>> file redirect stdout, but append to an existing file
< file redirect stdin from a file
| interprocess pipe (stdout --> stdin)
>& file redirect stdout and stderr to a file (csh)
> file 2&>1   redirect stdout and stderr to a file (bash)
Editing files
vi one of several standard UNIX editors
emacs a powerful text editor
Compilers
g77, gfortran  GNU FORTRAN compile (and load)
gcc GNU C compile (and load)
g++ GNU C++ compile (and load)
Network access
ftp  non-interactive remote access (for file transfers)*
ssh secure (encrypted) remote interactive shell
scp secure (encrypted) replacement for ftp

*This program is regarded as insecure, as it sends cleartext information around the network, and should be avoided whenever possible.

Other useful commands include: grep, awk, perl, python, diff, wc, ps, kill, alias, mail -- see "man" for more.