Unix Command Summary
Login/logout
login: accountnametype your UCSC account name, then press the RETURN key.
Password:
type your password (it does not print, so type carefully), then press the RETURN key.
logout
logs you off the system (logout is one word). You can also use exit.
General commands
clearclears your terminal screen.
date
shows the date and time.
cal 3 1998
shows the calendar for March 1998. cal 3 92 shows you March in 92 A.D.; try also cal 9 1752 !
retrieves mail which has been sent to you, and shows it one message at a time, prompting with & for disposition. Type a ? while inside mail to get a list of mail commands. Most people should use pine instead (see below). mail does not work in IC Solaris
passwd
changes your password. You are prompted once for your current password and twice for your new one. Printing is turned off while the passwords are typed. New passwords may be as long as eight characters.
kpasswd
changes your password in IC Solaris systems. You are prompted once for your current password and twice for your new one. Printing is turned off while the passwords are typed. New passwords may be as long as eight characters.
pine
another email program. Easier to use than mail because it is menu driven.
who
lists users who are currently logged in. If you type users, you get only their login names.
fs lq
How much filesystem storage quota you have used.
Online documentation
man command
prints a writeup from the UNIX Programmer's Manual for the specified command.
man -k topic(s)
locates commands by keyword lookup. For example, try man -k editor.
help
on Athena machines (e.g. si, am, ese, angus, and others) invokes lynx, a web text browser beginning at the ITS HelpDesk's home page. Use the on-screen menus to navigate.
quickhelp
help on IC Solaris Systems
File manipulation
ls
lists the files in the current directory. Type ls -l for a long list showing ownership, file size, and date modified.
cat filename(s)
shows the contents of the named file(s) on the terminal.
more filename(s)
displays the file(s), one screenful at a time. Push the space bar for the next screenful, the RETURN key for one more line, or q to
quit.
cp file1 file2
copies file1 onto file2. There are now two separate copies of the file.
cp file(s) directory
makes a copy of the named file(s) in the given directory and gives it the same file name(s) as the original file(s).
rm filename(s)
removes the named file(s).
mv old newname
changes the name of a file from old to newname.
mv file(s) directory
moves the file(s) to the specified directory. The original file name(s) remain(s) the same.
Directories
pwd
gives the pathname of the current directory (print working directory).
mkdir directory
makes a new directory with the given name. Some people capitalizes directory names so they stand out among the file names.
cd directory
changes to a different working directory.
cd
gets back to your home directory.
rmdir directory
removes the indicated directory. The directory must be empty.
fs listquota
shows how much of your file storage quota you have used
Printing
pr -Pprintername filename(s)
prints on named printer. Check with the Help Desk for information on site codes, locations, and costs.
Text processing
spell filename | more
lists possible spelling errors.
ispell filename
correct spelling errors. Type a : to get a list of commands.
look wordbeginning
looks up all words with the same starting letters. For example, try look dict.
doubwd filename
looks for the same two words in a row. A common common typo.
grep word filename
locates all instances of word in file filename.
wc filename
provides word, line, and character count of file.
webster word
prints the definition of the word.
History
history
lists your most recent commands. To repeat command on line 24, type !24.
!!
repeats the last command you typed.
!c
repeats the last command that started with c.
!cl
repeats the last command that started with cl.
!25
repeats command 25 from history list.
Special characters
Most of the special characters cause trouble in file names and should be avoided. File names can have a period or a dash within the file-name but should not start with a .period or a -dash. For further information on how special characters are interpreted, see the UNIX Programmer's Manual, under csh(1).
To interrupt and stop execution of a command, press BREAK or CONTROL-c . Type a CONTROL-s (stop) to stall the output to your terminal screen, and type a CONTROL-q (quick) to restart it. Type CONTROL-h to erase the previous character and CONTROL-w to erase the previous word. Type CONTROL-u to throw away the current line.
Need more help?
If you need more personal help, please contact the ITS Support Center.