home *** CD-ROM | disk | FTP | other *** search
/ CBM Funet Archive / cbm-funet-archive-2003.iso / cbm / c128 / os / unix128v3 / unix311b.sfx / intro.1 < prev    next >
Encoding:
Text File  |  1990-02-12  |  18.9 KB  |  463 lines

  1.  
  2.  
  3. Unix 128 v3.10 Manual           15 January 1992                          Page 1
  4.  
  5.  
  6.                               Table of Contents:
  7.  
  8.            1.   Distribution and Rights...........................1 
  9.            2.   Revisions Since Version 3.00......................1 
  10.            3.   Introduction......................................2 
  11.            4.   Building the Unix 128 System......................2 
  12.            5.   Logging In For The First Time.....................3 
  13.            6.   Customization of the Shell........................3 
  14.            7.   The Shell.........................................4 
  15.            8.   Files and Directories.............................5 
  16.            9.   Getting Help......................................5 
  17.            10.  Printing..........................................5 
  18.            11.  ftp...............................................6 
  19.            12.  nroff.............................................8 
  20.            13.  as................................................8 
  21.            14.  BASIC.............................................10
  22.            15.  emacs.............................................10
  23.            16.  tip...............................................11
  24.            17.  dc................................................12
  25.            18.  mail..............................................13
  26.            19.  spread............................................13
  27.            20.  Miscellaneous (games, tar, uuencode, style).......14
  28.  
  29. 1.  Distribution and Rights:
  30.  
  31. This system is distributed without warranty or guarantee of any kind.   It  may
  32. be  freely  distributed as long as it's intact with all documentation and code.
  33. Of course, I'd like my name to stay with the package, and I retain  all  rights
  34. to  the  source code that I wrote.  Bug reports, gripes, a paltry $10 shareware
  35. fee if you like this program may be sent to:
  36.              Gregg Riedel
  37.              20 Ellbert Street
  38.              Smithtown, NY 11787
  39. (it's my home address, but it's a little more stable than my college  address.)
  40. I will probably graduate SUNY-Binghamton around Spring '93 - I should retain my
  41. Consultant account until then:  consp24 @ bingvaxu.cc.binghamton.edu
  42.  
  43. Trademarks:  Unix is a trademark of AT&T.  Sun and SunOS are trademarks of  Sun
  44. Microsystems.  The main font used is taken from DesTerm 2.00's des.amigaset.
  45.  
  46.  
  47. 2.  Introduction:
  48.  
  49. Unix 128 v3.10 is a Unix based operating system  for  the  Commodore  128.   It
  50. takes the best points from AT&T System V, Sun Microsystems' SunOS, and Berkeley
  51. Unix.  This operating system supports such features as complete  file  control,
  52. text editing and processing, telecommunications, program development an on-line
  53. help.
  54.  
  55. Unix 128 is not a real Unix OS.  A "real" Unix system  is  multiprocessing  (it
  56. can  do  more  than  one  task  at  the  same time); has true pipelining (pipes
  57. supported by process forks instead of disk files); and is written  in  C  (Unix
  58. 128  was  written  in  CBM BASIC 7.0 and compiled into machine code with Abacus
  59. Software's Basic 128 compiler).  However, Unix 128 does  retain  the  look  and
  60. feel  of  a "real" Unix system, as well as some unix-compatible functions (tar,
  61. tip, uuencode/uudecode and nroff are examples).
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69. Unix 128 v3.10 Manual           15 January 1992                          Page 2
  70.  
  71.  
  72. 3.  Revisions Since Version 3.00:
  73.  
  74. Many revisions have been made  since  the  last  release  of  Unix  128.   Most
  75. importantly,  the  old system of keeping track of disk devices (designating one
  76. drive as the 'system drive' and another as the 'data drive') has been  flushed.
  77. The  main problems with the old system were that only two disk devices could be
  78. used, and that if you happened to put the system diskette into the  wrong  disk
  79. drive  Unix  couldn't  find  its  files.   The  new system, using what I call a
  80. 'path', eliminates these problems by keeping a list of all your  drives.   Each
  81. drive  on  the  list  is  searched  for  a  file you want to read or append to,
  82. eliminating disk swaps.  Writes are made to either the most logical  choice  or
  83. the  first drive in the path, whichever makes more sense.  See the manual entry
  84. on path for specific command information.
  85.  
  86. A second important revision was a revamping of the way pipes are  handled.   In
  87. older  versions  of  Unix  128,  pipes  needed  to  be  handled by each command
  88. separately; this went against both productivity and the  spirit  of  Unix.   In
  89. v3.10, the shell handles all pipes.  WARNING:  You should only attempt one pipe
  90. per command line.  The shell takes a command line with a pipe, for example:
  91.         % a {SHIFT-POUND} b
  92. and converts it to the following:
  93.         % a >tmp ; b tmp
  94. (of course, real Unix would simply fork two concurrent processes...)
  95. This is unfortunately a slow and cumbersome method of implementing pipes  (real
  96. Unix  starts  two  processes,  and  redirects  the output of the first into the
  97. second).  Consider the  command  'more  filename  {SHIFT-POUND}  lpr';  Unix  128  makes  a
  98. duplicate   copy   of   the   file   before  printing  it,  which  is  entirely
  99. counterproductive.  As a special case, I've patched around the  pipe  mechanism
  100. for  pipes  to  lpr;  anything  piped  to  lpr  will be printed immediately (no
  101. temporary files are used).
  102.  
  103. Many bugs in version 3.00 were reported and were fixed:
  104.      1.  Quota used to reset 1571 drives to 1541 mode.
  105.      2.  Make and startup required the use of drive 8.
  106.      3.  Some of the menu items worked incorrectly
  107.      4.  Emacs would add a <CR> at the end of files loaded in.
  108.      5.  alloc wouldn't return the right amount of REU memory after swaps.
  109.      6.  There were a few problems with the manual pages (typos etc.)
  110.      7.  tip:  Fixed the cursor addressing in both VT52 and VT100 modes.
  111.      8.  mail, ftp, spread, dc: updated and enhanced.
  112.  
  113.  
  114. 4.  Building the Unix 128 System:
  115.  
  116. The system requirements are:  a Commodore 128 computer, a 1571 disk drive,  and
  117. an  80-column RGB monitor.  As many drives as the bus can take may be supported
  118. (no special drive-specific code was used; just about any disk device should  be
  119. compatible).   A  printer is not only supported but recommended.  RAM expanders
  120. are recognized (Commodore RamDOS seems to  be  totally  incompatible  with  the
  121. Basic  128  compiler;  a RAM Disk such as the CMD RAMDrive should be completely
  122. compatible).  A Commodore 1670-compatible modem is supported.
  123.  
  124. The first step in setting up the Unix 128 system is unarchiving the files.   Do
  125. this by running each archive program in sequence.
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134. Unix 128 v3.10 Manual           15 January 1992                          Page 3
  135.  
  136.  
  137. Next, it is necessary to unarchive all the  system  data  files.   Do  this  by
  138. running the program "MAKE" and providing it with the device number of the drive
  139. that contains the system disk.  This program will write a few SEQ files (.login
  140. [system init file],  author  [about  me],  nroff.hlp  [the  nroff  help  file],
  141. nroff.tbl  [the  printer  table  for nroff], passwd [the system password file],
  142. stdlib.i [assembler macros], polish.ef  and  cyrillic.ef  [polish  and  russian
  143. fonts  for  emacs],  amiga.uf [the Unix 128 font; stolen in part from DesTerm's
  144. des.amigaset], and inventio13 [a music file]) to the disk, then check  to  make
  145. sure all the required files are present.
  146.  
  147.  
  148. 5.  Logging In For The First Time:
  149.  
  150. To start the Unix 128 system, type RUN "STARTUP".  It will load the shell  (the
  151. command  interpreter)  and  ask you for your username and password.  Use 'root'
  152. for both.
  153.  
  154. The last system file that needs to be written is the disk directory.  To  write
  155. this,  type  %  fsck  (I  will refer to shell commands in this fashion... the %
  156. isn't entered, but represents the system prompt).  'fsck'  does  a  "filesystem
  157. consistency  check"  which  makes  sure  the directory heirarchy is correct and
  158. writes the filesystem to the disk.  'fsck' should be executed  once  every  few
  159. sessions to ensure the validity of the filesystem.
  160.  
  161.  
  162. 6.  Customization of the Shell:
  163.  
  164. The shell has a configuration file called .login which may contain a number  of
  165. commands  to  customize  your  system.   The  following  is the standard .login
  166. supplied, with comments added in the second column:
  167.  
  168.    set prompt=%                   (Set the system prompt)
  169.    alias f1 alloc                 (Give a shortened version of a command.
  170.    alias f3 dir                      See the manual entry on 'alias')
  171.    alias ls ls -Fas                  (Give complete directories with size...)
  172.    alias help more help.txt          (help --> show the file 'help.txt')
  173.    color 16 1                     (Set the character and background colors)
  174.    login                          (Ask for passwords [or 'nologin'])
  175.    menu browse\browse             (Define the menu that pops up when ALT is
  176.    menu emacs\emacs                  is pressed.  The first parameter is what
  177.    menu tip\tip                      is shown in the menu; the subsequent
  178.    menu mail\mail                    parameters are the commands passed to the
  179.    menu puzzle\puzzle                shell.  'nop' does nothing.
  180.    (...)
  181.    menu --Exit--\nop
  182.  
  183. There is a single account set up (root); more may be  added  with  the  adduser
  184. command.
  185.  
  186. If you have a Seikosha SP1000 printer, the file 'nroff.tbl' is already  set  up
  187. for you.  If you own another type of printer, you have to edit 'MAKE' to change
  188. the settings for your printer.  MAKE is well commented; just follow the example
  189. set by the default 'nroff.tbl'.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201. Unix 128 v3.10 Manual           15 January 1992                          Page 4
  202.  
  203.  
  204. 7.  The Shell:
  205.  
  206. The shell is the command interpreter for  the  Unix  128  system.   It  is  the
  207. program that controls everything that you do.  It also keeps track of all sorts
  208. of data for you.  Some of the features of the shell include (in  no  particular
  209. order):
  210.  
  211. (1)  File security:  Unix 128 provides the 'chmod' command for  setting  access
  212. permission  for individual files.  You can select to allow or disallow read and
  213. write permission for both the owner of the file (yourself) and  everyone  else.
  214. These  permissions are shown by typing 'ls -l.'  Users with superuser privelege
  215. (the privelege level of a user is set when adding new accounts with  'adduser')
  216. can read and write any file, regardless of the access permissions.
  217.  
  218. (2)  History list:  Type 'history' to see the commands you've typed.  This list
  219. can  be  used  in  conjunction with the '!' operator to recall commands without
  220. typing them again.  Also, the cursor  keys  (up/down)  will  step  through  the
  221. previous  five  commands on the command line. (see the man entries on 'history'
  222. and '!')
  223.  
  224. (3)  Aliasing:  The shell keeps a list of alternate definitions  for  commands.
  225. This  allows  you  to  define  your  own short-cut command names.  For example:
  226. suppose you'd rather type 'au' than type 'adduser'... you can say  %  alias  au
  227. adduser.  Then, whenever you type 'au', 'adduser' will be substituted.  See the
  228. man entry on 'alias'.
  229.  
  230. (4)  Filename completion:  Instead of typing out long filenames, just  type  an
  231. unambiguous partial filename and press the ESC key.  For example, typing % more
  232. .l<ESC> will finish the line to % more .login, assuming you're currently in the
  233. root directory on the system disk.
  234.  
  235. (5)  Output redirection:  You can append a '>' and a filename to the end of the
  236. command line; this specifies that you'd like the output of a command to go to a
  237. file instead of to the screen (for example: % alloc >file).
  238.  
  239. (6)  Pipes:  Pipes connect two programs together, funneling the output  of  the
  240. first  into  the input of the second.  The pipe symbol is the vertical bar, the
  241. SHIFT-British pound key.  For example, say you'd like to see all the  lines  of
  242. output  of  the  alloc  command  that  contain  the phrase 'Memory'.  You could
  243. redirect the output of alloc to a file (alloc >file) then use grep  to  do  the
  244. search,  or you could say '% alloc {SHIFT-POUND} grep Memory'.  The second is a lot simpler
  245. and more elegant.
  246.  
  247. (7)  Multiple Commands:  You can enter multiple commands on  a  single  command
  248. line by separating them with a ';'.  For example:  % clear;alloc will clear the
  249. screen,  then  show  memory  allocation.   Spaces  are  irrelevant.   The  only
  250. restriction is that total command line length must be less than 255 characters.
  251.  
  252. (8)  Shell scripts:  You can write small shell scripts for Unix 128.   A  shell
  253. script  is  a  file  containing valid commands, whose first character is a '!'.
  254. Unfortunately, Unix 128 will only  allow  a  script  of  total  length  of  255
  255. characters.  An example might be:
  256.        !clear
  257.        alloc
  258.        iostat
  259. To execute a shell script, simply type its name at the shell prompt (%).
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267. Unix 128 v3.10 Manual           15 January 1992                          Page 5
  268.  
  269.  
  270. 8.   Files and Directories:
  271.  
  272. Unix 128 uses a different file/directory structure than the Commodore 128  DOS.
  273. Specifically,  it  allows you to create and remove subdirectories, and copy and
  274. rename files in between these directories.
  275.  
  276. The directory structure begins at the root directory (called 'root' or '/') and
  277. branches  downward into subdirectories.  Subdirectories are created and removed
  278. with the 'mkdir' and 'rmdir' commands respectively.  Files can be  moved  (mv),
  279. copied (cp), and removed (rm).
  280.  
  281. Unix 128 relies upon the directories  it  creates  on  the  diskette  for  file
  282. information-  the  CBM  DOS directory isn't used.  Sometimes, these directories
  283. become corrupt, usually through non-Unix disk operations.  It is  necessary  to
  284. issue the fsck command from time to time to keep these directories current.
  285.  
  286.  
  287. 9.   Getting Help:
  288.  
  289. Help is available just about every step  of  the  way.   There  is  an  on-line
  290. manual,  a  manual  browser for extended manual reading, and help screens built
  291. into almost every application.  Here is a guide on getting help:
  292.  
  293. 1.  From the shell:  You can type % man <command> to see the  manual  entry  on
  294. any  valid  command  (typing  %  commands  will  show the list of valid command
  295. names).  If you are just getting started, you might want to type  %  browse  to
  296. look through the manual at length.  Also, typing % apropos <phrase> will search
  297. the manual for a phrase and return the commands that apply.
  298.  
  299. 2.  From Individual Applications:
  300.     emacs:  [CONTROL]-h  (normally written C-h) will show the emacs
  301.             help screen, and '[ESC] x nroff' (normally written M-x
  302.             nroff) will show the nroff help screen.
  303.     spread: C-h will show the help screens.
  304.     mail:   Type ? at the & prompt for a list of commands.
  305.     dc:     Type ? at the dc> prompt for a list of commands.
  306.     ftp:    Type ? at the ftp> prompt for a list of commands.
  307.  
  308.  
  309. 10.  Printing:
  310.  
  311. Files can be printed in one of two ways:
  312.  
  313.      (1) Directly:  To print a  file  (or  list  of  files),  you  type  %  lpr
  314. filename.  If more than one filename is given, the first is printed immediately
  315. and the subsequent files are queued for printing (swapping out the  shell  will
  316. destroy  the  print  queue.)   If you wish to do other things (besides anything
  317. that swaps out the shell) while printing, place a '&' at the end of the command
  318. line  (ex:   %  lpr  foo.txt&).   This  will  print  the file in the background
  319. (slowly!).  % lpq will show the printer queue, and % lprm will remove all items
  320. from the printer queue.
  321.  
  322.      (2) Copying output through pipes:  Any text output from a command  can  be
  323. re-directed  to  the  printer by appending {SHIFT-POUND}lpr to the end of the command line.
  324. For example, % screendump {SHIFT-POUND} lpr will print the screen, and % lptest {SHIFT-POUND} lpr  will
  325. test the printer.
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333. Unix 128 v3.10 Manual           15 January 1992                          Page 6
  334.  
  335.  
  336. 11.  Introduction to ftp
  337.  
  338. Unix 128 v3.10 comes with a  new  improved  version  of  ftp.   ftp,  the  file
  339. transfer program, is a combination of a unique file transfer protocol and a set
  340. of terminal instructions designed to transmit and  recieve  files  between  two
  341. Unix  128  sites.  It is not compatible with the Internet ftp used between BSD,
  342. DEC, SUN and other large-scale Unix systems.
  343.  
  344. The ftp command invokes one of two modes.   The  first  mode  (remote  terminal
  345. mode)  is  used  to  originate  a modem communications link to another Unix 128
  346. system.  The second mode (server mode) is used to answer incoming calls and act
  347. as a fileserver.
  348.  
  349. To invoke remote terminal mode, type % ftp  or  % ftp phone-number.  If a phone
  350. number is given, ftp will automatically dial that number and attempt to connect
  351. to another Unix 128 system (the system you dial must already be running in  ftp
  352. server mode.)
  353.  
  354. To invoke server mode, type % ftp -s.  ftp will wait for  the  phone  to  ring,
  355. answer it, and begin the session.
  356.  
  357. 11.1  Remote Terminal Commands:
  358.       The following commands are available at the ftp> prompt:
  359.  
  360. ?              Get help (list the command summary)
  361. ascii          Save incoming files as SEQ, don't convert PETSCII<->ASCII
  362. binary         Save incoming files as PRG, don't convert PETSCII<->ASCII
  363. bye            Hang up the phone, quit ftp and return to Unix 128 
  364. cd [dir]       Change directory to [dir]
  365. close          Hang up the phone but do not exit ftp.
  366. convert        Binary conversion of PRG files to SEQ files.
  367. dir            Read current remote directory
  368. get [file]     Get a file from the remote system.  Select ascii, text, or
  369.                binary first to assure the proper file type and conversion.
  370. hash           Show a hash mark (#) for every 512 bytes transferred.  This 
  371.                command toggles hash mark printing on and off.
  372. open [number]  Dial a phone number and attempt to connect to a remote system.
  373. send [file]    Send a file to the remote system.
  374. server         Invoke server mode from remote terminal mode.
  375. text           Save incoming files as SEQ files, convert PETSCII<->ASCII
  376.                (There is almost no need for this command.  When in doubt,
  377.                use ascii and convert later with 'dd -s')
  378.  
  379. 11.2  Server Commands:
  380.  
  381.       The only input the server allows is CTRL-c or CTRL-z, and it allows these
  382. only  if  someone  is not connected to your machine at the time.  CTRL-c breaks
  383. back to Unix 128, and CTRL-z breaks back to terminal mode.  All file  transfers
  384. and directory requests are automatic.  The new version of ftp (v2.00) now sends
  385. filetype information with get and send requests (the older version of ftp saved
  386. everything as un-translated program files).
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399. Unix 128 v3.10 Manual           15 January 1992                          Page 7
  400.  
  401.  
  402. 11.3  The ftp Protocol:
  403.  
  404. ftp uses a special message-passing X-Modem derived protocol for file transfers.
  405. First,  a  request  goes  from  the remote terminal to the server telling it to
  406. either send or receive a file.  The file is sent in  128  byte  blocks  in  the
  407. following format:
  408.                     [ 127 bytes of data ] [ control byte ]
  409. The control byte is one of three values.  If it is 0, another block is  coming.
  410. If  it is Control-Y or Control-Z, then this is the last block and the last byte
  411. of valid data is the one that is not equal to the control  byte  (If  the  last
  412. valid  byte  is  not Control-Z then the control byte will be Control-Z.  If the
  413. last valid byte is Control-Z, Control-Y will be the control byte.)
  414.  
  415. All data connections are made with 8 data bits, no parity, 1 stop bit, at  1200
  416. baud.
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.