@device(imprint10)
@make(ReferenceCard)
@definefont(Userfont, 1=<Typecase ComputerModernBold10R36>,
2=<Typecase ComputerModernBold10R18>,
3=<Typecase ComputerModernBold10R14>,
4=<Typecase ComputerModernBold10R12>)
@Style(Font computermodernroman9)
@Style(spacing 1,indent 0)
@Style(leftmargin .33inch)
@Style(linewidth 4.0inches)
@Style(TopMargin 1inches)
@Style(BottomMargin .5 inches)
@Tabclear
@Tabset(2.5 inches)
@Modify(display, rightmargin +0)
@Modify(example,rightmargin +0)
@Modify(heading, font userfont, facecode 2)
@modify(subheading, font userfont, facecode 4,above .2inch,below .2inch)
@begin(MajorHeading,Above 0, Below .2inch, Font Userfont,facecode 1)
Unix Quick Ref
@end(Majorheading)
@Begin(Heading,Flushright,Above 0,font Userfont, facecode 3)
MIT Project Athena
Revision B
September 5, 1985
@End(Heading)
@Blankspace(.3 inches)
@begin(Heading,Flushleft,above .3inch, below .2inch)
To Login
@end(heading)
@begin(display,leftmargin .1 inch)
Athena Login Server (MIT-HOST.MIT.EDU:tty time date)

Machine name:   @i(yourhost)
MIT-HOST.MIT.EDU login: @i(yourusername)
Password: @i(yourpassword)
@end(display)
@begin(Heading,Flushleft,above .3inch, below .2inch)
To Logout
@end(heading)
@begin(display, leftmargin .1 inch)
host% logout
@end(display)
@begin(Heading, Flushleft, above .3inch, below .2inch)
Control Keys
@end(heading)
@begin(display, leftmargin .1 inch)
@b(backup) to correct typing mistake@\@b(DELETE key)
@b(cancel) line and start over@\CTRL-U
cancel a command in progress, bail
  out of any facility, "stop"@\CTRL-C

also try:@\q
@\exit
@\RETURN CTRL-D
@\CTRL-Z
@end(display)
@begin(Heading,Flushleft,above .3inch, below .2inch)
Command Format
@end(heading)
@begin(display,leftmargin .1 inch)
  @i(command)    [@i(options)]  @i(files)
@end(display)
@begin(Heading,Flushleft,above .3inch, below .2inch)
Getting Help
@end(heading)
@begin(display, leftmargin .1 inch)
when you know the name of the command
@\man @i(command)
when you know what you want to do, but
 don't know the command that does it@\apropos @i(keyword)
                                             or@\man -k @i(keyword)

Where @i(keyword) is any verb or noun you can think of
that might describe what you are trying to do.  The 
broader the @i(keyword) you select, the better the chance
you have of finding it.  When all else fails, try
"file."
@end(display)
@newpage
@begin(Heading,Flushleft,above .3inch, below .2inch)
Files
@end(heading)
@begin(subheading)
Create File
@end(subheading)
@begin(display,leftmargin .1 inch)
Use the Emacs editor.  See @i(Essential Emacs)

"Quick and Dirty" Method:
@display[

host% cat >@i(filename)
Unix moves the cursor down to the next line.
You type.  End each line with a RETURN.  You
can only fix errors in the current line with
the DELETE key, or cancel the whole line with
CTRL-U.  To end, hit a RETURN and then
a CTRL-D.
^D
host%
]

Make the output of a command into a file:
@display[
host% @i(anycommand) > @i(anyfilename)
]
@end(display)
@begin(subheading)
Get a List of Files 
@end(subheading)
@begin(display, leftmargin .1 inch, rightmargin +0)
list of normal files@\ls
list of @b(all) files@\ls -a
list showing files types@\ls -F
list with @b(long) information@\ls -l
@begin(example, leftmargin +0, rightmargin +0)
  -rwx--x--x  1  ownerid  1228  Jan 31 02:50  name
  __________  _  _______  ____  ____________  ____
  |   |       |     |       |          |        |
 d if |    # links  |   # bytes        |    filename
 dir  |             |     size         |     
      |             |                  |             
  protection    who owns it     date & time created
                                 or last modified
@end(example)
By default, all of the above work on the current
directory.  To get the list of a different
 directory, say:@\ls @i(options  directoryname)
@end(display)
@begin(subheading,flushleft)
Delete File
@end(subheading)
@begin(display,leftmargin .1 inch)
to delete a file, short for remove@\rm @i(filename)
@end(display)
@begin(subheading,flushleft)
Copy File
@end(subheading)
@begin(display,leftmargin .1 inch)
to copy a file, short for copy@\cp @i(fromfile  tofile)
to copy between machines
                              rcp @i('remotehost:fromfile') @i(tofile)
@end(display)
@begin(subheading)
Move File (Rename)
@end(subheading)
@begin(display, leftmargin .1 inch)
to move or rename a file@\mv @i(fromfile) @i(tofile)
@end(display)
@newpage
@begin(subheading,flushleft)
Display Files on Terminal
@end(subheading)
@begin(display, leftmargin .1 inch)
display continuously on terminal@\cat @i(filename)
display page-by-page@\more @i(filename)

Within @i(more) the valid responses are:
      give me the next screen@\SPACEBAR
      give me the next line @\RETURN key
      forget it, I've seen enough@\q

show the last @i(n) lines of a file@\tail -@i(n  filename)
@end(display)
@begin(Heading,Flushleft,above .3inch, below .2inch)
Directories
@end(heading)
@begin(subheading, flushleft)
Create or Delete Directory
@end(subheading)
@begin(display, leftmargin .1 inch)
to create a new directory@\mkdir @i(directoryname)
to delete a directory@\rmdir @i(directoryname)

Note: you can only delete a directory after you have
deleted all the files underneath it.
@end(display)
@begin(subheading, flushleft)
Moving Around Directories
@end(subheading)
@begin(display, leftmargin .1 inch)
show me the current working directory@\pwd
change the current working directory
 to @i(directory)@\cd @i(directory)
from wherever I am, bring me to my home
 directory@\cd
@end(display)
@begin(subheading, flushleft)
Directory Specifications
@end(subheading)
@b(Relative)
@begin(display, leftmargin .1 inch)
the current directory@\@b(.)
the directory above me@\@b(..)
a directory below the current one
  (@b(NOT @p(/directory!)))@\@i(directory)
my HOME directory (shorthand, doesn't
  work in programs)@\~/
the HOME directory of @i(user), wherever
  that may be (shorthand, doesn't work in programs)
  (e.g., ~fred is "fred's home directory")@\~user
@end(display)

@b(Absolute)
@begin(display,leftmargin .1 inch)

@i(/dir/dir/dir/dir...)

where / always denotes the root directory and
the remainder is an explicit pathway down from there.
You must always give an explicit directory specification
inside a program.
@end(display)
@newpage
@begin(Heading,Flushleft,above .3inch, below .2inch)
Printed Output
@end(heading)
@begin(display,leftmargin .1 inch)
print file on default printer@\lpr @i(filename)
print file on named @i(printer)@\lpr -P @i(printer) @i(filename)

@p(printer) is one of:
@begin(display, leftmargin +5)
line
laser
@i(printer).@i(building)  (e.g.: line.bldgw20, laser.bldg11, etc.)
@end(display)

show all files in printer queue, shows job#@\lpq -P @i(printer)

remove a file from the printer queue@\lprm -P @i(printer  job#)
@end(display)
@begin(text, leftmargin +1)
@b(Default) printers:  In clusters with both @i(line)
and @i(laser) printers, the default is @i(line).  Otherwise,
it is @i(laser).

The @i(line) printer is a DEC LP26 that prints 66 lines per
page, 132 characters across on 11 x 15 continuous form paper.

The @i(laser) printer is a DEC LN01 that prints 66 lines/page,
80 characters across, on 8 1/2 x 11 cut sheet paper.  The
font is a 10 char/inch, typewriter like Courier.

@i(Note:  There is a sign in the cluster
saying where its printers are.) 
@end(text)


@begin(Heading, flushleft, above .3 inch, below .2inch)
Hardcopy Graphics
@end(heading)
@begin(enumerate)
Find the VT240 with the typewriter-like LA100 @i(attached
to it).  There is one in each cluster.  You can "bump"
someone who is not using it for hardcopy graphics.

Login as usual.

Do whatever is necessary to make the screen look exactly
like what you want.

Press SHIFT-F2  (Hold down SHIFT, press F2 at keyboard top.)

Graphic should come out on LA100.
@end(enumerate)



@begin(Heading, Flushleft, above .3 inch, below .2 inch)
Change Password
@end(heading)
@begin(text, leftmargin +1)
change password on all machines:
@begin(display, leftmargin +5)
host% @p(passwd)
Changing passwd for @i(username)
Old password: @p(oldpassword)
New password: @p(newspassword)
Retype newpassword: @p(newpassword)
@end(display)
@end(text)
@newpage


@begin(Heading,Flushleft,above .3inch, below .2inch)
File Protection (Mode)
@end(heading)
@begin(display, leftmargin .1 inch)
to see your default@\ls -ld ~

@begin(example, leftmargin +0, rightmargin +0)
        rwx      --x      --x
        ___      ___      ___
        user    group    others

r: permission to read (look at) file's contents.
   On directories, permission to use ls command.
w: permission to change file's contents.
   On directories, permission to delete files
        beneath it and create files under it.
x: permission to execute file.
   On directories, permission to "pass through" it.
@end(example)

to change a file's protection:

  chmod  u=[@i(rwx)],g=[@i(rwx)],o=[@i(rwx)]  @i(filename)

   ([@i(rwx)] means to pick some combination of)

to change default protection@\See @i(More Unix)
@end(display)

@begin(Heading,Flushleft,above .3inch, below .2inch)
Reading Mail
@end(heading)
@begin(display)
establish which machine to send your mail to
                                chhome @i(machinename)
@end(display)
See @i(Essential Mail) for more information.
@begin(Heading,Flushleft,above .3inch, below .2inch)
Reading System Messages
@end(heading)
@begin(display, leftmargin .1 inch)
read the next system message @i(n), as shown
  in your @i(.msgsrc) file@\msgs
read system messages beginning at @i(n)@\msgs @i(n)
print just message headers, beginning at @i(n)@\msgs -h @i(n)
any of the above, but pipe long messages
  through @i(more)@\msgs -p ...

Within @i(msgs), these responses are valid:

   type the rest of the message@\y or RETURN
   skip to next message@\n
   save the last-read message in @i(file)@\s- @i(filename)
   show message n@\@i(n)
   quit out of msgs@\q
@end(display)

@begin(Heading,Flushleft,above .3inch, below .2inch)
To See What's Going On
@end(heading)
@begin(subheading, flushleft)
Processes
@end(subheading)
@begin(display, leftmargin .1 inch)
show process status of your processes@\ps -ux
show process status of everything@\ps -aux
kill a process you own@\kill -9 @i(processid)
@end(display)
@begin(subheading, flushleft)
People
@end(subheading)
@begin(display, leftmargin .1 inch)
short list of who's logged in on your host@\users
longer list of who's logged in on host@\who
even longer list of who's logged in on host@\w
who's logged in over the network@\rwho
print information about a local user based
  on his/her name or username@\finger @i(name)
                                    or@\finger @i(username)
  (He/she doesn't have to be logged in.)
print information about a user on a remote
  machine@\finger @i(username@@host)
@end(display)

@begin(heading, flushleft, above .3 inch, below .2 inch)
X Window System
@end(heading)
@begin(text, leftmargin +1)
Works only on VAXstation 100 terminals.

Mouse "I" cursor must point @u(in) the window you
want to type in.

For more info, see @i(man xterm) and @i(man xwm)
@end(text)
@subheading(Create Window)
@begin(enumerate,spread 0)
@tabclear
@tabset(2.0 inch)
create a window@\xterm &

position upper left corner of incipient window
with mouse

incarnate window:
@begin(display, leftmargin +3)
24 line x 80 col window@\LEFT button
66 line x 80 col window @\RIGHT button
@end(display)
@end(enumerate)

@subheading(Manipulate Windows)
@begin(enumerate)
@tabclear
@tabset(2.0 inch)
start window manager@\xwm &

while holding down SYMBOL key at left of
SPACEBAR:@BEGIN(multiple)
@begin(display, leftmargin +0)
pop window to top@\RIGHT button
move window@\RIGHT + move mouse

resize window@\CENTER button
de-iconify window@\CENTER button

push window to bottom@\LEFT button
iconify window@\LEFT + move mouse
@end(display)
@end(multiple)
@end(enumerate)

@subheading(Delete xterm Windows)
@begin(text, leftmargin +1)
type @i(exit) in window or @i(logout)
of login window.
@end (text)
