This reference has vi tutorials and WWW basics.
Also check out the computer guides available at
http://www.cco.caltech.edu/cco/refguide/
http://carnot.engr.utk.edu/ecc/unixguide/node193.html
(1) Logging in
- login : < userid >
- password : < password >
From another system, or the campus LAN (LAN = local area network) one
of the following commands might be necessary, provided you have
an account with the math dept.:
- % telnet euclid
- % telnet mathgrad
- % rlogin euclid
- % rlogin mathgrad
From off-campus, may need :
- euclid.ucsd.edu (address = 132.239.145.52)
- mathgrad.ucsd.edu (address = 132.239.145.27)
"Euclid" and "math" are the same system.
"Banach" and "mathgrad" are the same system.
Euclid and banach share disks, so you may login to either one and still access
your files.
(2) Prompts
Are usually "euclid%" or "< pathname > %", we'll just write
"%" for the prompt.
(For experts: customize your promt in .cshrc).
Notation : < ... > denote parameters.
(3) Basic Cursor Commands
- Carriage Return is "Return" or "Enter" key.
- Backspace is "Del" or "Delete" key or can be "Backspace" or
control-H
(we'll write <ctrl> to mean enter the control key)
- <ctrl-C> will abort most programs.
- <ctrl-D> is the EOF (end-of-file) character when typed on a line by itself. It can also be used to end input to a program.
- <ctrl-U> erases the current command line.
- <ctrl-Z> will interrupt current process.
(enter "fg" to resume the process)
(4) Logging out
To logout use % logout or % exit. Also, % <ctrl-D> works
sometimes.
(5) Files and Directories
Files are organized in directories.
- Listing names of files
- % ls - List all files in the current directory not including
files whose
name starts with ".".
- % ls -a - List all files.
- % ls -l - Also lists access permissions, owners and creation dates.
- % ls -al - Combines above options
- % ls *.tex - Lists all files that have name ending with ".tex".
- Changing to another directory
- cd <dir> - Make <dir> the current directory.
- cd .. - parent directory
Examples :
- cd ../smith/new
- cd ~ (or cd) - Takes you to your login directory
- cd ~smith - smith's login directory
Creating a directory
- % mkdir <newdir>
Print working directory (current directory)
- % pwd
- Moving Files (renaming files)
- % mv <oldname> <newname>
Example: - % mv ../game/main.tex main.tex
- % mv <filenamelist> <dir> -
moves all the files to the directory <dir>
Example: - % mv ../game/main.tex .
- Copying Files
- % cp <fromfile> <tofile>
- % cp <filenamelist> <dir> - works similar to move
- Removing (deleting) Files
- % rm <filenamelist> - erases the files
- % rm -i < filenamelist > - asks before deleting file
- % rmdir < dir >
- removes empty directory < dir >
- % rm -r < dir >
- removes < dir >, all its subdirectories (recursively),
and their files
-
Examples:
- % rm *.dvi
- % rm -r bkup/old
- removes old but not bkup
(6) Passwords / Registration / Finger
Change your password with:
- % passwd
(On some systems, you must use "% yppasswd ".)
- Network password - Needed to dial in to UCSD network.
- % telnet ucsd.edu
- login: mailreg
- password: register
- then you can set/change your
password and your email address
- Accessing UCSD's directory information
- % finger <name> @ucsd.edu
- % telnet infopath 7008
- Finger
- % finger smith
- gives current status of smith on this machine
- % finger smith@euclid
- gives status of smith on the machine euclid
- Finger will do its best with incorrect useids.
For example
- % finger smith@euclid
- % finger john@euclid
should tell you the userid is jsmith.
- Who
- % who - lists all users currently logged in.
- % who am i - tells who you are and how long you have
been logged on.
(7) Printing Files
- % cat <filename> - prints the contents of the file.
- % cat <filenamelist> - lists the contents of files to the
screen (i.e. stdout).
- % more <filenamelist> - lists file contents one screen
at a time.
When the screen is full it stops. You may use commands :
- space - lists another screen full
- return -shows one more line
- q - quit
- /<string> -searches for the next occurrence of
<string>.
- ? -lists all available commands
- b -lists the previous screen
- % tail <file> -prints the last lines of a file
(8) Printing Files to a Laser Printer
- % lpr <filelist> - spools the named files
- % lpr -P <printername> <filelist>
Example : % lpr -Php7132mx main.ps
- lpr -d <dvifiles>
- Alternately use
- % dvips <dvifile>
The -P <printer> option works with dvips too.
- To convert dvi to postscript and save it (not print it), use :
% dvips paper.dvi -o paper.ps - (dvips has lots of other options).
- lpr -#2 <filelist> - spools two copies
- % dvips -P 7 -l 10 - prints pages 7 through 10
- & lpq or % lpq -P <printer> -displays the queue of
jobs for the laser printer.
- % lprm <num> or % lprm -P <printer> <num>
-removes print job number <num> from the queue.
- To change your default printer
- % setenv PRINTER <printer>
Example : % setenv PRINTER hp7132mx
- % printev PRINTER - shows default printer name.
(9) Online Help
- % man <cmd> -documentation of <cmd> ("man" is for
manual)
- % man -k <keyword> - lists all commands in the man
pages that have <keyword> in their name or their
one-line description.
- Examples
- % man lpr
- % man dvips
- % man man
- % man -k dvi
- %man -k postscript
Contact author: Sam
Buss, sbuss@ucsd.edu
Last updated: July 10, 1996.