home *** CD-ROM | disk | FTP | other *** search
-
-
- Unix 128 v3.10 Manual 15 January 1992 Page 1
-
-
- Table of Contents:
-
- 1. Distribution and Rights...........................1
- 2. Revisions Since Version 3.00......................1
- 3. Introduction......................................2
- 4. Building the Unix 128 System......................2
- 5. Logging In For The First Time.....................3
- 6. Customization of the Shell........................3
- 7. The Shell.........................................4
- 8. Files and Directories.............................5
- 9. Getting Help......................................5
- 10. Printing..........................................5
- 11. ftp...............................................6
- 12. nroff.............................................8
- 13. as................................................8
- 14. BASIC.............................................10
- 15. emacs.............................................10
- 16. tip...............................................11
- 17. dc................................................12
- 18. mail..............................................13
- 19. spread............................................13
- 20. Miscellaneous (games, tar, uuencode, style).......14
-
- 1. Distribution and Rights:
-
- This system is distributed without warranty or guarantee of any kind. It may
- be freely distributed as long as it's intact with all documentation and code.
- Of course, I'd like my name to stay with the package, and I retain all rights
- to the source code that I wrote. Bug reports, gripes, a paltry $10 shareware
- fee if you like this program may be sent to:
- Gregg Riedel
- 20 Ellbert Street
- Smithtown, NY 11787
- (it's my home address, but it's a little more stable than my college address.)
- I will probably graduate SUNY-Binghamton around Spring '93 - I should retain my
- Consultant account until then: consp24 @ bingvaxu.cc.binghamton.edu
-
- Trademarks: Unix is a trademark of AT&T. Sun and SunOS are trademarks of Sun
- Microsystems. The main font used is taken from DesTerm 2.00's des.amigaset.
-
-
- 2. Introduction:
-
- Unix 128 v3.10 is a Unix based operating system for the Commodore 128. It
- takes the best points from AT&T System V, Sun Microsystems' SunOS, and Berkeley
- Unix. This operating system supports such features as complete file control,
- text editing and processing, telecommunications, program development an on-line
- help.
-
- Unix 128 is not a real Unix OS. A "real" Unix system is multiprocessing (it
- can do more than one task at the same time); has true pipelining (pipes
- supported by process forks instead of disk files); and is written in C (Unix
- 128 was written in CBM BASIC 7.0 and compiled into machine code with Abacus
- Software's Basic 128 compiler). However, Unix 128 does retain the look and
- feel of a "real" Unix system, as well as some unix-compatible functions (tar,
- tip, uuencode/uudecode and nroff are examples).
-
-
-
-
-
-
-
- Unix 128 v3.10 Manual 15 January 1992 Page 2
-
-
- 3. Revisions Since Version 3.00:
-
- Many revisions have been made since the last release of Unix 128. Most
- importantly, the old system of keeping track of disk devices (designating one
- drive as the 'system drive' and another as the 'data drive') has been flushed.
- The main problems with the old system were that only two disk devices could be
- used, and that if you happened to put the system diskette into the wrong disk
- drive Unix couldn't find its files. The new system, using what I call a
- 'path', eliminates these problems by keeping a list of all your drives. Each
- drive on the list is searched for a file you want to read or append to,
- eliminating disk swaps. Writes are made to either the most logical choice or
- the first drive in the path, whichever makes more sense. See the manual entry
- on path for specific command information.
-
- A second important revision was a revamping of the way pipes are handled. In
- older versions of Unix 128, pipes needed to be handled by each command
- separately; this went against both productivity and the spirit of Unix. In
- v3.10, the shell handles all pipes. WARNING: You should only attempt one pipe
- per command line. The shell takes a command line with a pipe, for example:
- % a {SHIFT-POUND} b
- and converts it to the following:
- % a >tmp ; b tmp
- (of course, real Unix would simply fork two concurrent processes...)
- This is unfortunately a slow and cumbersome method of implementing pipes (real
- Unix starts two processes, and redirects the output of the first into the
- second). Consider the command 'more filename {SHIFT-POUND} lpr'; Unix 128 makes a
- duplicate copy of the file before printing it, which is entirely
- counterproductive. As a special case, I've patched around the pipe mechanism
- for pipes to lpr; anything piped to lpr will be printed immediately (no
- temporary files are used).
-
- Many bugs in version 3.00 were reported and were fixed:
- 1. Quota used to reset 1571 drives to 1541 mode.
- 2. Make and startup required the use of drive 8.
- 3. Some of the menu items worked incorrectly
- 4. Emacs would add a <CR> at the end of files loaded in.
- 5. alloc wouldn't return the right amount of REU memory after swaps.
- 6. There were a few problems with the manual pages (typos etc.)
- 7. tip: Fixed the cursor addressing in both VT52 and VT100 modes.
- 8. mail, ftp, spread, dc: updated and enhanced.
-
-
- 4. Building the Unix 128 System:
-
- The system requirements are: a Commodore 128 computer, a 1571 disk drive, and
- an 80-column RGB monitor. As many drives as the bus can take may be supported
- (no special drive-specific code was used; just about any disk device should be
- compatible). A printer is not only supported but recommended. RAM expanders
- are recognized (Commodore RamDOS seems to be totally incompatible with the
- Basic 128 compiler; a RAM Disk such as the CMD RAMDrive should be completely
- compatible). A Commodore 1670-compatible modem is supported.
-
- The first step in setting up the Unix 128 system is unarchiving the files. Do
- this by running each archive program in sequence.
-
-
-
-
-
-
-
-
- Unix 128 v3.10 Manual 15 January 1992 Page 3
-
-
- Next, it is necessary to unarchive all the system data files. Do this by
- running the program "MAKE" and providing it with the device number of the drive
- that contains the system disk. This program will write a few SEQ files (.login
- [system init file], author [about me], nroff.hlp [the nroff help file],
- nroff.tbl [the printer table for nroff], passwd [the system password file],
- stdlib.i [assembler macros], polish.ef and cyrillic.ef [polish and russian
- fonts for emacs], amiga.uf [the Unix 128 font; stolen in part from DesTerm's
- des.amigaset], and inventio13 [a music file]) to the disk, then check to make
- sure all the required files are present.
-
-
- 5. Logging In For The First Time:
-
- To start the Unix 128 system, type RUN "STARTUP". It will load the shell (the
- command interpreter) and ask you for your username and password. Use 'root'
- for both.
-
- The last system file that needs to be written is the disk directory. To write
- this, type % fsck (I will refer to shell commands in this fashion... the %
- isn't entered, but represents the system prompt). 'fsck' does a "filesystem
- consistency check" which makes sure the directory heirarchy is correct and
- writes the filesystem to the disk. 'fsck' should be executed once every few
- sessions to ensure the validity of the filesystem.
-
-
- 6. Customization of the Shell:
-
- The shell has a configuration file called .login which may contain a number of
- commands to customize your system. The following is the standard .login
- supplied, with comments added in the second column:
-
- set prompt=% (Set the system prompt)
- alias f1 alloc (Give a shortened version of a command.
- alias f3 dir See the manual entry on 'alias')
- alias ls ls -Fas (Give complete directories with size...)
- alias help more help.txt (help --> show the file 'help.txt')
- color 16 1 (Set the character and background colors)
- login (Ask for passwords [or 'nologin'])
- menu browse\browse (Define the menu that pops up when ALT is
- menu emacs\emacs is pressed. The first parameter is what
- menu tip\tip is shown in the menu; the subsequent
- menu mail\mail parameters are the commands passed to the
- menu puzzle\puzzle shell. 'nop' does nothing.
- (...)
- menu --Exit--\nop
-
- There is a single account set up (root); more may be added with the adduser
- command.
-
- If you have a Seikosha SP1000 printer, the file 'nroff.tbl' is already set up
- for you. If you own another type of printer, you have to edit 'MAKE' to change
- the settings for your printer. MAKE is well commented; just follow the example
- set by the default 'nroff.tbl'.
-
-
-
-
-
-
-
-
-
-
-
- Unix 128 v3.10 Manual 15 January 1992 Page 4
-
-
- 7. The Shell:
-
- The shell is the command interpreter for the Unix 128 system. It is the
- program that controls everything that you do. It also keeps track of all sorts
- of data for you. Some of the features of the shell include (in no particular
- order):
-
- (1) File security: Unix 128 provides the 'chmod' command for setting access
- permission for individual files. You can select to allow or disallow read and
- write permission for both the owner of the file (yourself) and everyone else.
- These permissions are shown by typing 'ls -l.' Users with superuser privelege
- (the privelege level of a user is set when adding new accounts with 'adduser')
- can read and write any file, regardless of the access permissions.
-
- (2) History list: Type 'history' to see the commands you've typed. This list
- can be used in conjunction with the '!' operator to recall commands without
- typing them again. Also, the cursor keys (up/down) will step through the
- previous five commands on the command line. (see the man entries on 'history'
- and '!')
-
- (3) Aliasing: The shell keeps a list of alternate definitions for commands.
- This allows you to define your own short-cut command names. For example:
- suppose you'd rather type 'au' than type 'adduser'... you can say % alias au
- adduser. Then, whenever you type 'au', 'adduser' will be substituted. See the
- man entry on 'alias'.
-
- (4) Filename completion: Instead of typing out long filenames, just type an
- unambiguous partial filename and press the ESC key. For example, typing % more
- .l<ESC> will finish the line to % more .login, assuming you're currently in the
- root directory on the system disk.
-
- (5) Output redirection: You can append a '>' and a filename to the end of the
- command line; this specifies that you'd like the output of a command to go to a
- file instead of to the screen (for example: % alloc >file).
-
- (6) Pipes: Pipes connect two programs together, funneling the output of the
- first into the input of the second. The pipe symbol is the vertical bar, the
- SHIFT-British pound key. For example, say you'd like to see all the lines of
- output of the alloc command that contain the phrase 'Memory'. You could
- redirect the output of alloc to a file (alloc >file) then use grep to do the
- search, or you could say '% alloc {SHIFT-POUND} grep Memory'. The second is a lot simpler
- and more elegant.
-
- (7) Multiple Commands: You can enter multiple commands on a single command
- line by separating them with a ';'. For example: % clear;alloc will clear the
- screen, then show memory allocation. Spaces are irrelevant. The only
- restriction is that total command line length must be less than 255 characters.
-
- (8) Shell scripts: You can write small shell scripts for Unix 128. A shell
- script is a file containing valid commands, whose first character is a '!'.
- Unfortunately, Unix 128 will only allow a script of total length of 255
- characters. An example might be:
- !clear
- alloc
- iostat
- To execute a shell script, simply type its name at the shell prompt (%).
-
-
-
-
-
-
-
- Unix 128 v3.10 Manual 15 January 1992 Page 5
-
-
- 8. Files and Directories:
-
- Unix 128 uses a different file/directory structure than the Commodore 128 DOS.
- Specifically, it allows you to create and remove subdirectories, and copy and
- rename files in between these directories.
-
- The directory structure begins at the root directory (called 'root' or '/') and
- branches downward into subdirectories. Subdirectories are created and removed
- with the 'mkdir' and 'rmdir' commands respectively. Files can be moved (mv),
- copied (cp), and removed (rm).
-
- Unix 128 relies upon the directories it creates on the diskette for file
- information- the CBM DOS directory isn't used. Sometimes, these directories
- become corrupt, usually through non-Unix disk operations. It is necessary to
- issue the fsck command from time to time to keep these directories current.
-
-
- 9. Getting Help:
-
- Help is available just about every step of the way. There is an on-line
- manual, a manual browser for extended manual reading, and help screens built
- into almost every application. Here is a guide on getting help:
-
- 1. From the shell: You can type % man <command> to see the manual entry on
- any valid command (typing % commands will show the list of valid command
- names). If you are just getting started, you might want to type % browse to
- look through the manual at length. Also, typing % apropos <phrase> will search
- the manual for a phrase and return the commands that apply.
-
- 2. From Individual Applications:
- emacs: [CONTROL]-h (normally written C-h) will show the emacs
- help screen, and '[ESC] x nroff' (normally written M-x
- nroff) will show the nroff help screen.
- spread: C-h will show the help screens.
- mail: Type ? at the & prompt for a list of commands.
- dc: Type ? at the dc> prompt for a list of commands.
- ftp: Type ? at the ftp> prompt for a list of commands.
-
-
- 10. Printing:
-
- Files can be printed in one of two ways:
-
- (1) Directly: To print a file (or list of files), you type % lpr
- filename. If more than one filename is given, the first is printed immediately
- and the subsequent files are queued for printing (swapping out the shell will
- destroy the print queue.) If you wish to do other things (besides anything
- that swaps out the shell) while printing, place a '&' at the end of the command
- line (ex: % lpr foo.txt&). This will print the file in the background
- (slowly!). % lpq will show the printer queue, and % lprm will remove all items
- from the printer queue.
-
- (2) Copying output through pipes: Any text output from a command can be
- re-directed to the printer by appending {SHIFT-POUND}lpr to the end of the command line.
- For example, % screendump {SHIFT-POUND} lpr will print the screen, and % lptest {SHIFT-POUND} lpr will
- test the printer.
-
-
-
-
-
-
-
- Unix 128 v3.10 Manual 15 January 1992 Page 6
-
-
- 11. Introduction to ftp
-
- Unix 128 v3.10 comes with a new improved version of ftp. ftp, the file
- transfer program, is a combination of a unique file transfer protocol and a set
- of terminal instructions designed to transmit and recieve files between two
- Unix 128 sites. It is not compatible with the Internet ftp used between BSD,
- DEC, SUN and other large-scale Unix systems.
-
- The ftp command invokes one of two modes. The first mode (remote terminal
- mode) is used to originate a modem communications link to another Unix 128
- system. The second mode (server mode) is used to answer incoming calls and act
- as a fileserver.
-
- To invoke remote terminal mode, type % ftp or % ftp phone-number. If a phone
- number is given, ftp will automatically dial that number and attempt to connect
- to another Unix 128 system (the system you dial must already be running in ftp
- server mode.)
-
- To invoke server mode, type % ftp -s. ftp will wait for the phone to ring,
- answer it, and begin the session.
-
- 11.1 Remote Terminal Commands:
- The following commands are available at the ftp> prompt:
-
- ? Get help (list the command summary)
- ascii Save incoming files as SEQ, don't convert PETSCII<->ASCII
- binary Save incoming files as PRG, don't convert PETSCII<->ASCII
- bye Hang up the phone, quit ftp and return to Unix 128
- cd [dir] Change directory to [dir]
- close Hang up the phone but do not exit ftp.
- convert Binary conversion of PRG files to SEQ files.
- dir Read current remote directory
- get [file] Get a file from the remote system. Select ascii, text, or
- binary first to assure the proper file type and conversion.
- hash Show a hash mark (#) for every 512 bytes transferred. This
- command toggles hash mark printing on and off.
- open [number] Dial a phone number and attempt to connect to a remote system.
- send [file] Send a file to the remote system.
- server Invoke server mode from remote terminal mode.
- text Save incoming files as SEQ files, convert PETSCII<->ASCII
- (There is almost no need for this command. When in doubt,
- use ascii and convert later with 'dd -s')
-
- 11.2 Server Commands:
-
- The only input the server allows is CTRL-c or CTRL-z, and it allows these
- only if someone is not connected to your machine at the time. CTRL-c breaks
- back to Unix 128, and CTRL-z breaks back to terminal mode. All file transfers
- and directory requests are automatic. The new version of ftp (v2.00) now sends
- filetype information with get and send requests (the older version of ftp saved
- everything as un-translated program files).
-
-
-
-
-
-
-
-
-
-
-
-
- Unix 128 v3.10 Manual 15 January 1992 Page 7
-
-
- 11.3 The ftp Protocol:
-
- ftp uses a special message-passing X-Modem derived protocol for file transfers.
- First, a request goes from the remote terminal to the server telling it to
- either send or receive a file. The file is sent in 128 byte blocks in the
- following format:
- [ 127 bytes of data ] [ control byte ]
- The control byte is one of three values. If it is 0, another block is coming.
- If it is Control-Y or Control-Z, then this is the last block and the last byte
- of valid data is the one that is not equal to the control byte (If the last
- valid byte is not Control-Z then the control byte will be Control-Z. If the
- last valid byte is Control-Z, Control-Y will be the control byte.)
-
- All data connections are made with 8 data bits, no parity, 1 stop bit, at 1200
- baud.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-