home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

1.4 Beginner's Guide

If you're just beginning to work on a Unix system, the abundance of commands might prove daunting. To help orient you, the following lists present a small sampling of commands on various topics.

1.4.1 Communication

ftp File transfer protocol.
login Sign on to Unix.
mailx Read or send mail.
rlogin Sign on to remote Unix.
talk Write to other terminals.
telnet Connect to another system.
vacation Respond to mail automatically.

1.4.2 Comparisons

cmp Compare two files, byte by byte.
comm Compare items in two sorted files.
diff Compare two files, line by line.
diff3 Compare three files.
dircmp Compare directories.
sdiff Compare two files, side by side.

1.4.3 File Management

cat Concatenate files or display them.
cd Change directory.
chmod Change access modes on files.
cp Copy files.
csplit Break files at specific locations.
file Determine a file's type.
head Show the first few lines of a file.
ln Create filename aliases.
ls List files or directories.
mkdir Create a directory.
more Display files by screenful.
mv Move or rename files or directories.
pwd Print working directory.
rcp Copy files to remote system.
rm Remove files.
rmdir Remove directories.
split Split files evenly.
tail Show the last few lines of a file.
wc Count lines, words, and characters.

1.4.4 Miscellaneous

banner Make posters from words.
bc Arbitrary precision calculator.
cal Display calendar.
calendar Check for reminders.
clear Clear the screen.
man Get information on a command.
nice Reduce a job's priority.
nohup Preserve a running job after logging out.
passwd Set your login password.
script Produce a transcript of your login session.
spell Report misspelled words.
su Become a superuser.

1.4.5 Printing

cancel Cancel a printer request.
lp Send to the printer.
lpstat Get printer status.
pr Format and paginate for printing.

1.4.6 Programming

cb C source code "beautifier."
cc C compiler.
cflow C function flowchart.
ctags C function references (for vi ).
ctrace C debugger using function call tracing.
cxref C cross-references.
lint C program analyzer.
ld Loader.
lex Lexical analyzer generator.
make Execute commands in a specified order.
od Dump input in various formats.
strip Remove data from an object file.
truss Trace signals and system calls.

Parser generator. Can be used with lex .

1.4.7 Searching

egrep Extended version of grep .
fgrep Search files for literal words.
find Search the system for filenames.
grep Search files for text patterns.
strings Search binary files for text patterns.

1.4.8 Shell Programming

echo Repeat command-line arguments on the output.
expr Perform arithmetic and comparisons.
line Read a line of input.
printf Format and print command-line arguments.
sleep Pause during processing.
test Test a condition.

1.4.9 Storage

compress Compress files to free up space.
cpio Copy archives in or out.

Expand compressed (.gz and .Z ) files (preferred).


Display contents of compressed files (may be linked to zcat ).

gzip Compress files to free up space (preferred).
tar Tape archiver.
uncompress Expand compressed (.Z ) files.
zcat Display contents of compressed files.

1.4.10 System Status

at Execute commands later.
chgrp Change file group.
chown Change file owner.
crontab Automate commands.
date Display or set date.
df Show free disk space.
du Show disk usage.
env Show environment variables.
finger Display information about users.
kill Terminate a running command.
ps Show processes.
stty Set or display terminal settings.
who Show who is logged on.

1.4.11 Text Processing

cut Select columns for display.
ex Line editor underlying vi .
fmt Produce roughly uniform line lengths.
join Merge different columns into a database.

New version of awk (pattern-matching language for textual database files).

paste Merge columns or switch order.
sed Noninteractive text editor.
sort Sort or merge files.
tr Translate (redefine) characters.
uniq Find repeated or unique lines in a file.
vi Visual text editor.
xargs Process many arguments in manageable portions.

1.4.12 nroff and troff

In SVR4, all but deroff are in the compatibility packages. Solaris comes bundled with a modern version of troff and its preprocessors (pic isn't included).

deroff Remove troff codes.
eqn Preprocessor for equations.
nroff Formatter for terminal display.
pic Preprocessor for line graphics.
refer Preprocessor for bibliographic references.
tbl Preprocessor for tables.
troff Formatter for typesetting (including PostScript printers).

Previous: 1.3 What's in the Quick Reference UNIX in a Nutshell: System V Edition Next: 1.5 Guide for Users of BSD-Derived Systems
1.3 What's in the Quick Reference Book Index 1.5 Guide for Users of BSD-Derived Systems

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System