INTRODUCTORY UNIX COMMANDS


File and Directory Commands

cd [directory]

chmod [permission level] [file-list]

cp (-ir) [source] [destination]

grep (-iv) [pattern] [file-list]

ls (-adlR) [file-list]

mkdir [directory]

more [filename]

mv (-i) [source] [destination]

pwd

rm (-ir) [file-list]

rmdir [directory]

sort (-bcdfMnoru) [file-list]

tail (+-) [file]

tar (-cfrtvxzZ) [file-list]

Disk Usage Commands

du (-as) [directory]

System and Process Commands

alias (aliasname) (definition)

bg [job number]
fg [job number]

kill (-signal) [pid]

nice (number) [command]

ps (-aux)

top

Printing Commands

lpr (-P#) [file-list]

lpq (-P)

lprm (-P) [job number]

Miscellaneous Commands

compress [file]
uncompress [file]

exit

gzip (-adr) [file-list]
gunzip (-adr) [file-list]

man (-k) [command]

passwd

wc (-cClw) [file-list]

Special Characters

There are several wildcard symbols in UNIX:

These can be inside of an argument, for example, a*.exe would include anything that begins with 'a', ends with '.exe', and has anything in the middle. a?.exe would include anything that begins with 'a', is followed by a single character, then ends with '.exe'.

In addition to these two wildcard symbols, square brackets can also enclose a selection of wildcard characters. For example, 'a[ab].exe' would include both 'aa.exe' and 'ab.exe'.

Please note that UNIX IS case-sensitive, so FOO is not the same as foo. If you have a directory named STUFF, then 'cd stuff' will not change to it, only 'cd STUFF' will.

[command1] | [command2]

[command] > [file]
[command] >> [file]
[command] >! [file]

[command] < [file]