Hints
- use * as a wildcard in situations where you want to effect
multiple files all with the same characteristic. (e.g. rm ga* -- removes
all files starting with ga in the directory)
- up and down arrows toggle through previously issued commands (saves typing)
- the {tab} key finishes unique file references (e.g. cat fr {tab} will generate cat frog.txt if it is the only file starting with fr in the directory (saves typing)
the starred (*) commands below are among the most useful
italicized words are to be replaced by the user with specific parameters
Miscellaneous
*man command online manual for specified command
(use this command for more details about most of commands below)
*command & trailing & (ampersand) causes commands to run in background mode
*finger user gives info on user if name is found
clear clears screen
wc filename counts lines, words, & characters in specified file
cal month year prints a calendar for given (numeric) month
date gives today's date
talk username allows you to write to others on same server. ^C quits
xcalc brings up calculator
Navigation
*ls lists files and directories (like dir in ms-dos)
*ls -l lists files and directories with more information
ls -al same as ls -l but also includes hidden files
*cd changes current directory to home directory
*cd .. changes current directory to parent directory
*cd sub-directory changes current directory to sub-directory
cd ~username changes current directory to home of username
*mkdir dirname makes a subdirectory
*rmdir dirname removes subdirectory (only if it is empty)
pwd shows working directory
File Manipulation
*cp file1 file2 copys the contents of file1 to file2
mv file1 file2 renames file1 as file2
mv file1 sub-dir moves file1 into sub-dir
*rm file1 removes file1 (careful with wildcards!!)
*compress file1 compresses file1 into file1.Z
*uncompress file1.Z uncompresses file1.Z into file1
cat file1 file2 concatenates file2 to the end of file1
grep 'string' file1 lists records in file1 containing string
*enscript file1 formats file1 in POSTSCRIPT and prints
*enscript -2r file1 prints in landscaped orientation with 2 pages per sheet
*lpr file1 prints file1 to default printer
*less file1 displays file1 (q to quit out) in screenfuls
more file1 displays file1 (dumber than less) in screenfuls
head file1 shows beginning 10 lines of file1
head -n file1 shows beginning n lines of file1, where is a count
*tail file1 shows last 10 lines of file1
*emacs file1 editor of choice- an
">
">emacs introduction
pico simple but useful Wordstar-like editor (on acpub system)
vi file1 a difficult but widely available and powerful editor
Process Control
*^C keystoke for interrupting a UNIX command
^Z suspends process and returns user to command line.
ps shows processes currently associated with userid
kill -9 PID terminates process of given Process ID number
Mail and Connectivity
*elm e-mail reader on this system (using emacs as default editor)
pine another mailer found on acpub system
*rlogin host.name initiates terminal session to specified host
(no password is required if target machine is equivalent)
*telnet host.name initiates terminal session to specified host
ftp host.name initiates file transfer protocol operation with specified host
Administration
alias give new name to old command (check man page for details)
yppasswd changes your password
df -k reports disk free space (rarely needed)
du summary of disk usage
w lists who else is currently logged on your workstation
whoami tells you who you are
Redirection
command > file1 puts command output into file1
command >> file1 appends output to end of file1
command1 | command2 the pipe command sends output of command1 to command2