A Quick Introduction to TOPS-20 File Specifications
---------------------------------------------------
The items comprising a TOPS-20 file specification are organized from the most
general to the most specific. The most common form of a file specification
is:
dev:
name.type.gen
where:
dev: is a device name, a file structure name, or a
defined logical name.
is a directory name. You must always include
the angle brackets around a directory name.
name is a file name.
.typ is a file type.
.gen is a generation number.
Device Names - DEV:
-------------------
A device name designates the storage device or file structure that
contains, or will contain, the file. A device name consists of alphabetic
characters that indicate the type of device, a number that specifies a
particular device, and a colon that identifies the name as a device name.
Examples of a device name are:
PS: DSK: TTY: MTA1: and LPT:
If you omit a device name from a file specification, the system uses your
currently connected file structure as a default.
=> The device name for the UNIX-SW repository is PD6:
Directory Names -
-----------------------
A directory name consists of up to 39 alphanumeric characters including
hyphen, dollar sign, and underline. Directory names are always enclosed in
brackets. Examples of directory names are:
(You may use square brackets "[]" in place of angle brackets if you wish.)
=> The top-level directory for all the UNIX-SW software is called
A directory may have subdirectories in it. Subdirectories are named by
separating their names from their parents' with periods. Some examples
are:
File Names - NAME
-----------------
Each file has a name consisting of up to 39 alphanumeric characters,
including hyphen, dollar sign, and underline. Examples of file names are:
TEST LINDRW SPCWAR LEM
File Types - .TYP
-----------------
When you want to indicate the contents of a file or give the same file
name to more than one file, specify a file type consisting of a period
followed by up to three alphanumeric characters, including hyphen, dollar
sign, and underline.
=> The more common file types used in the UNIX-SW repository are:
.ARC A file compressed with the "arc" program.
.C A C language source file
.SH A shell script
.TAR A "tar" archive
.TXT An ordinary text file
=> If the file type is .DIRECTORY, then the name represents a subdirectory
of the current directory and can be cd'ed to (see next section).
=> If the file type ends in "-Z", e.g. .TAR-Z, it has been compressed
with the "compress" program.
Generation Numbers - .GEN
-------------------------
A generation number reflects approximately the number of times a file has
been modified. Generally only one version of a file will be stored in the
repository. However, if you find multiple versions of a file and would
like an earlier version, specify the generation number explicitly. If you
do not specify a generation number, the highest generation will be used.
Transferring Files With FTP
---------------------------
To transfer files from the UNIX-SW repository, you should first use your
local FTP program ("ftp" on most UNIX systems) to connect to the host
WSMR-SIMTEL20.ARMY.MIL. When you are prompted for a login name enter
"anonymous". When prompted for a password, enter "guest". You are now
logged in, and can begin transferring files. Example using 4.2BSD FTP:
% ftp simtel20.army.mil
Connected to simtel20.army.mil.
220 WSMR-SIMTEL20.ARMY.MIL FTP Server Process 5Z(50)-7 at Sun 14-Feb-88
Name (simtel20.army.mil:davy): anonymous
Password (simtel20.army.mil:anonymous): guest ; password not echoed
331 User name ok. Password, please.
230 User ANONYMOUS logged in at Sun 14-Feb-88 15:48-MST, job 13.
ftp>
The simplest way to transfer files, that is, the method which saves you the
most typing, is to change directories into the directory you want to retrieve
files from. For starters, you can say:
ftp> cd "pd6:"
250 Connected to PD6:.
ftp>
Note the quotes around the directory name; these are necessary in some
versions of FTP to prevent the local program from interpreting the "<"
and ">" as input and output redirection commands. Also note that you
can use lower case letters; TOPS-20 does not distinguish case in file
and directory names.
Now, to obtain a list of the files contained in the directory, you can use
the "dir" command:
ftp> dir
200 Port 6.246 at host 128.46.130.83 accepted.
150 List started.
PD6:
000-INTRO-UNIX-SW.TXT.1
000-MASTER-INDEX.TXT.6
[deleted for brevity]
EDITORS.DIRECTORY.1
LANGUAGES.DIRECTORY.1
[deleted for brevity]
UNIX-C.ARC.80131
UNIX-C.CRCLST.80131
[deleted for brevity]
226 Transfer completed.
669 bytes received in 0.08 seconds (8.2 Kbytes/s)
ftp>
Now, suppose you want to go into one of the subdirectories you see (and in
this case we will assume a subdirectory of that directory also). You would
type:
ftp> cd "pd6:"
250 Connected to PD6:.
ftp>
Note that the directory name starts with "unix-c", but that we can omit the
"pd6:" since we are already there. If you had not done the initial "cd"
above, you would have to specify "pd6:" also.
Now we can do another "dir" command:
ftp> dir
200 Port 6.247 at host 128.46.130.83 accepted.
150 List started.
PD6:
ARITHPARSE.TAR-Z.1
[deleted for brevity]
VSTR.TAR-Z.1
XCP.C.1
226 Transfer completed.
737 bytes received in 1.24 seconds (0.58 Kbytes/s)
ftp>
Finally, suppose we want to get the file XCP.C onto our machine, and call it
"foobar.c". We would type:
ftp> get xcp.c foobar.c
200 Port 6.248 at host 128.46.130.83 accepted.
150 ASCII retrieve of XCP.C.1 started.
226 Transfer completed. 8401 (8) bytes transferred.
8401 bytes received in 6.58 seconds (1.2 Kbytes/s)
ftp>
Note that we didn't bother with the generation number (in this case, .1);
unless you want an earlier generation of a file, it is not necessary.
And finally, to terminate the FTP session, use the "quit" command:
ftp> quit
221 QUIT command received. Goodbye.
%
Specifics on Transferring Files
-------------------------------
Most of the files in the UNIX-SW repository are compressed "tar" files.
Their file type will be ".TAR-Z". Other files, whose names end in
".TXT", ".C", etc. can be transferred in ASCII mode with FTP. But
compressed files cannot be transferred this way, because they contain
binary data.
To transfer these files, you need to do something special before you use the
FTP "get" command:
- If you are on a TOPS-10, TENEX, TOPS-20, or ITS system, you can use
"image" or "paged" mode for ALL files you transfer.
- If you are on a UNIX system, you should use "ascii" mode for ASCII
files, and "tenex" mode for binary files. To do this, you can
enter:
ftp> type ascii for ASCII files, and
ftp> type l 8 (that's lower-case-L 8) or
ftp> type tenex for BINARY files
- On MULTICS, you can use "ascii" mode for ASCII files, but binary
files require that you enter:
user_ftp: !quote "type l 8"
This will store the file with one 8-bit byte per 9-bit word.
If you cannot use "tenex" mode and have to use "binary" mode (which is "type
l 32"), you should get a copy of PD6:BINTNX.C or BINTNXVMS.C.
These programs convert files transferred in "binary" format to "tenex"
format, like they should be.
The Obligatory Cover-Our-Behinds Statement
------------------------------------------
All the software in the UNIX-SW repository is provided AS IS with NO
WARRANTY. We cannot guarantee that it is good for any particular purpose, or
even that it works.
I make an attempt to examine the software submitted to me to at least make
sure it doesn't contain Trojan horses and what-have-you, and the moderator of
comp.sources.unix, where a lot of this stuff comes from, also does this.
But, as with all free software written by strangers, MAKE SURE YOU KNOW WHAT
YOU'RE INSTALLING BEFORE YOU INSTALL IT!