UnderGround Information




             :::::::::::::::::::::::::::::::::::::: 
             ::UNIX PRIMER PLUS COMMAND REFERENCE::
              :::                              ::: 
               ::------------------------------::
               ::                              :: 
               ::  Created, edited and dist by ::
               ::                              ::
               ::              ---*            ::
               ::                              ::
               ::             Frosty           ::
               ::                              ::
               ::     GCMS - MechWarriors      ::
               ::                              ::
               ::------------------------------::
 
 Starting up :::
 ---------------
 
 LOGIN -  sign on
 PASSWD - change login password
 
 Manipulating Files and Directories :::
 -------------------------------------- 
 
 CAT - concatenate and print
      CAT [-N,-S,-V] file . . .
 
    Options :
      -N  numbers lines starting at 1
      -S  eliminates multiple, consecutive, blank lines
      -V  prints invisible characters
  
    Example :
 
      CAT FILE2  displays file2 on terminal. 
  
 CD, CHDIR - change directory
      CD
      CD directoryname
 
     Example :
 
      CD/USER/REGGIE/HACK  places you in the USR/REGGIE/HACK directory    
 
 CHMOD - change modes or permissions on files
       CHMOD UGO, + -, RWX file . . . or directory . . .
 
     Who :
 
       U  login owner ( user )
       G  group
       O  other users

     Op-Codes :
       
       +  add permission
       -  remove permission
 
     Permissions :
 
        R  read
        W  write
        X  execute
 
     Examples :
 
       CHMOD O-RWX PRIVATE   removes read, write and execute permissions for
                             others from the file called PRIVATE
 
 CP - make copy of files
       CP[-I]  file1  file2 
       CP[-I]  file . . . ( file, file . . . , directory )
 
     Option :
 
        -I  protects existing  files
 
      Examples :
 
        CP FLIM FLAM   makes  a copy of the file FLIM and calls it FLAM
 
 LN - make a file linds
       LN  file . . . file . . . or file . . . directoryname
 
     Example :
 
       LN HIST /USR/FRANCIE  links the file HIST to the /USR/FRANCIE directory
 
 LPR, LPQ and LPRM - use the line printer
       LPR   file . . .
       LPQ
       LPRM  file . . .
 
     Options :
        These vary from system to system
 
     Example :
 
        LPR SOME STUFF sends the file SOME and STUFF to the printer
        LPQ            checks the line  printer queue
        LPRM DATA3     removes the file DATA3 from the printer queue
 
 LS - list contents of directory
       LS [-A, C, L, M, R, S, F, R, + others] directory . . .
 
     Options :
        -A  list all entries
        -C  list by time of file creation
        -L  list in long format
        -M  list in  a stream output
        -R  reverses the order of the listing
        -S  gives the size in blocks
        -F  marks directories with a '/' and executable programs with a '*'
            ( the -F is  capitalized )
        -R  list recursively any subdirectories
            ( the -R is  capitalized )
 
     Example :
        LS -C  lists contents of current directory in order of time of creation
 
 MKDIR - makes a new directory
       MKDIR  directoryname
 
     Example :
       MKDIR CHAPTER4  creates a new subdirectory called CHAPTER4 in the
                       present directory
 
 MORE - views long files one screenful at a time
       MORE file . . .
 
 MV - move or rename files
        MV [-I]  filename1 filename2  or filename1 directoryname
 
     Option :
       -I  Protects existing files
 
     Example :
       MV GABBY MUDBALL  changes the name of the file GABBY to  MUDBALL
 
 RM - remove a file
       RM [-I, -R] file . . .
 
     Options:
       -I  Protects existing files
       -R  Deletes a directory and every file or directory in it ( be careful )
 
     Example:
        RM JUNKY removes the file JUNKY
 
 RMDIR - removes directories
       RMDIR directory . . .
 
     Example:
       RMDIR BUDGET65  removes directory BUDGET65 if it does not contain files
 
 REDIRECTION OPERATORS -<, >, >>
 
     Example:
       CAT LISTA LISTB >> LISTC  appends the files  LISTA and LISTB to LISTC
 
 PIPES - |
 
     Example:
       CAT LISTA LISTB | LPR  joins two files and 'pipes' the result to printer
 
 COMMUNICATIONS :::
 ------------------
 
 BIFF - notification of mail upon  arrival
       BIFF [Y, N]
 
     Example:
       BIFF Y  causes you to be notified the moment mail arrives
 
 FINGER - provides information about users
       FINGER [-M, -L, -S] name
 
     Options:
       -M  search only login names
       -L  display long form
       -S  display short form
 
     Example:
       FINGER -S RONNIE  finds all users with login name of 'RONNIE'
 
 MAIL - receiving mail
       MAIL
 
     Commands:
       1, 2, 3 . . . reads message number 1 each time you push 1, etc.
       P             prints the first message
       D2            deletes message number 2
       S3 FILENAME   appends message number 3 to FILENAME
       Q             quits mail
 
    Other commands may exist on some systems
 
 MAIL - sending mail
       MAIL LOGINNAME(S)
 
     Examples:
       MAIL SCUMMY MANIAX
       { text of message here }
       [CONTROL - D]
 
 MESG - permit or deny messages from write
       MESG [-Y, -N]
 
     Example:
       MESG N  prevents people from using WRITE to interrupt you
 
 WRITE - write to another user
       WRITE LOGINNAME
 
 HOUSEKEEPING UTILITIES :::
 --------------------------
 
 CAL - provides a calendar
       CAL [month] year
 
     Example:
       CAL 05 1942  is the calendar for May 1942
 
 CALENDAR - a reminder service
     You create a file in your home directory called CALLENDAR.
     Unix sends you reminders by mail
 
     Example:
       Your CALENDAR file might look like:
 
       Break into ATT March 19
       Transfer funds to CuD March 20
       1992 report due
 
 DATE - gives date and time
 
 LOCK - reserves your terminal
 
 PWD - prints working directory
 
 UPTIME - checks system status
 
 W - who is on the system and what they are doing
       W
       W [-H, -S] user
 
     Options:
       -H  suppresses the heading
       -S  short form
 
     Example:
       W -HS TROOPER  lists the user, TROOPER, idle time, and job name
 
 WHO - who is on the system
       WHO [AM I]
 
     Example:
       WHO  tells who is on the system
 
 ON-LINE HELP :::
 ----------------
 
 LEARN - computer-assisted lessons
       Type LEARN to start these lessons
 
 MAN - find manual information by keywords
       MAN [-K] [keyword]
 
     Option:
       -K  produces a one-line summary
 
     Example:
       MAN CAT  displays the on-line namual explanation of CAT
 
 TEXT PROCESSING AND FORMATTING :::
 ----------------------------------
 
 ED - line-oriented text editor
       ED file
 
 NROFF - advanced typesetting 
 
 PR - prints partially formatted file
       PR [-N, -M, -T] file . . .
 
     Options:
       -N  arranges text into n columns
       -M  prints all files in multiple columns
       -T  suppresses heading on each page
 
     Example:
       PR FROSTY  prints file FROSTY on the terminal
 
 VI - the screen-oriented test editor
       VI file
 
 INFORMATION HANDLING :::
 ------------------------
 
 AWK - pattern scanning and processing language
 
 CMP - compare two files
       CMP filename1 filename2
 
     Example:
       CMP SWASS TROOPER  finds and prints by byte and line number the
                          first difference between the two files
 
 COMM - finds lines common to two sorted files
       COMM [-1, -2, -3] file1 file2
 
     Options:
       -1  don't print the first column
       -2  don't print the second column
       -3  don't print the third column
 
     Example:
       COMM FROSTY JUNKY  prints three columns.  First, lines only in FROSTY,
                          secondly, lines only in file JUNKY, and thirdly, 
                          lines in both files
 
 DICTION - will print wordy sentences
       DICTION file . . .
 
 DIFF - finds the difference between two files or directories
       DIFF [-B, -E, -R] file1 file2 or directory1 directory2
 
     Options:
       -B  ignores trailing blanks
       -E  output in  the form of ED commands
       -R  apply to directories recursively
 
     Example:
       DIFF GIFT1 GIFT2  shows how to make GIFT1 like GIFT2
 
 FIND - finds designated files and acts upon them
       FIND pathname search criteria action(s)
 
     Search Criteria:
        -NAME filename   files named 'filename'
        -SIZE n          files of size n blocks
        -LINKS n         files with n links
        -ATIME n         files accessed n days ago
        -MTIME n         files modified n days ago
        -NEWER filename  files modified more recently than the file 'filename'
 
        ( Note 'n' without a sign means exactly n, '+n' means greater than n,
          '-n' means less than n )
 
     Actions:
       -PRINT             prints the pathname of the found file
       -EXEC command \;   executes the given command upon finding a file;
                          { } represents the found file
       -OK  command \;    same as -EXEC except your approval is requested
                          before each execution; reply with a Y
 
     Example:
       FIND /USR/FROSTY -MTIME -10 -PRINT  finds all files in USR/FROSTY
                                           directory that have been modified
                                           within 10 days and prints pathnames
 
 GREP - search a file for a pattern
       GREP [-N, -I, -C, -W] pattern file
 
     Options:
       -N  precedes each matching line with its line number
       -I  ignores the case of letters
       -C  prints only a count of matching lines
       -W  matches only complete words with the pattern
 
     Example:
       GREP -IW PHRACK CODE  searches the file PHRACK for the words
                             'code', 'CODE', 'Code', etc. . . .
 
 HEAD - looks at the head of a file
       HEAD [-N] file . . .
 
     Option:
       -N  print 'n' lines
 
     Example:
       HEAD -15 2600  prints the first 15 lines of the file 2600
 
 SORT - sorts and merges files
       SORT [-B, -D, -F, -N, -O, -R] file . . .
 
     Options:
       -B           ignore initial blanks
       -D           'dictionary' order
       -F           ignores upper and lowercase letters
       -N           sorts numbers by value
       -O FILENAME  outputs to file called FILENAME
       -R           sort in reverse order
 
     Example:
       SORT -FR -O SORTBAG GRABBAG  sorts the file GRABBAG in reverse order,
                                    ignoring upper and lowercase letters.
                                    results stored in SORTBAG
 
 SPELL - find spelling errors
       SPELL file . . .
 
 TAIL - gives the last part of a file
       TAIL [-N] file
 
     Option:
       -N  start 'n' lines from the end
 
     Example:
       TAIL -20 EFF  prints the last 20 lines of the file EFF
 
 UNIQ - remove duplicated  
       UNIQ [-U, -D, -C] inputfile [outputfile]
 
     Options:
       -U  prints only lines with no duplicates
       -D  prints one copy of lines with duplicates
       -C  prints number of times line is repeated
 
     Example:
       UNIQ -D CHAOS EO  scans the file CHAOS for lines that appear more than
                         once.  One copy of each line placed in the file EO
 
 WC - word count
       WC [-L, -W, -C, -P] file . . .
 
     Options:
       -L  counts lines
       -W  counts words
       -C  counts characters
       -P  counts pages ( 66 lines )
 
     Example:
       WC -W MABELL  counts the number of words in the file MABELL
 
 RUNNING JOBS AND PROGRAMS :::
 -----------------------------
 
 AT - execute commands at a later time
       AT time [day] [file]
 
     Example:
       AT 23 VIRAL  runs the commands in the file VIRAL at 11:00 pm
 
 CC - compile C programs
       CC [-C, -O] file . . .
 
     Options:
       -C           creates object file suuppressing loading
       -O filename  uses filename for the file A.OUT
 
     Example:
       CC PHREAKER.C  compiles PHREAKER.C file, with the executable program
                      placed in A.OUT file 
 
 F77 - compile FORTRAN programs
       F77 [-C, -O] file . . .
 
     Options:
       -C            creates object file suppressing loading
       -O filename   uses filename for file A.OUT
 
     Example:
       F77 PAYROLL.F  compiles PAYROLL.F file, with the executable
                      code placed in A.OUT file
 
 JOBS - will list stopped and background jobs
       JOBS [-L]
 
     Option:
       -L  gives long listing that includes process identification number (PID)
 
 KILL - will terminate jobs
       KILL [-9] job number or process ID
 
     Option:
       -9  this is a sure kill
 
     Example:
       KILL %3 or KILL 3492 kills job[3] or PID #3492
 
 PC - compiles Pascal programs
       PC [-C, -O] file . . .
 
     Options:
       -C           creates object code file suppressing loading
       -O filename  uses filename for A.OUT
 
     Example:
       PC E911.P  compiles E911.P file, with the executable code placed
                  in A.OUT file
 
 PS - the Process Status Report
       PS [A]
 
     Option:
       A  displays PS information for all terminals
 
 TEE - split output
       TEE [-I, -A] file
 
     Options:
       -I  ignores interrupts
       -A  sends output to the end of named file
 
     Example:
       LS -L /USR | TEE -A CLUTTER  produces the long listing of  the /USR
                                    directory on the terminal and also appends
                                    it to the  end of the file CLUTTER
 
 TIME - will time a command
       TIME commandname
 
     Example:
       TIME CC TROJAN.C  runs the command CC TROJAN.C and prints execution time
                         when finished
 
 ------------------------------------------------------------------------------
 Produced by:  Frosty ---*  
               GCMS - MechWarriors
               " Educating the Masses "
 ------------------------------------------------------------------------------
 Call these other fine BBS'
      Temple of the Screaming Electron..........415-935-5845
      Sirius Cybernetics Corporation............808-521-3306
      The Hollow................................415-849-2688
 
 And NUAs
      Lutzifer.................................26245400080177
      LINA.....................................22222800173
-------------------------------------------------------------------------------