maclab@reed.UUCP (Mac Development Lab) (09/19/85)
Included in this file is documentation for the desk accessory 'RasNIX.'
RasNIX is a miniature pseudo-UNIX emulator, which allows you perform some
simple commands to look at disks and files (ls, wc, cd, rm, etc.) I will
momentarily be posting a BinHexed RasNIX (as an Apple Font/DA Mover file), as
well as the source code. RasNIX was written entirely with The Rascal
Development System. For any of you Rascallers out there who might be reading
this, I suggest you take a quick look at the source: I rewrote RasNIX with
an experimental version of Rascal (post A+ version), and it should give you a
taste of some of the new features you can expect in the next release.
A few comments:
1) Note that Rascal can take the Compiler+Linker output of the
RasNIX source and:
(a) execute it within the development environment
(b) turn it into a stand-alone application
(c) turn it into a desk accessory
No source modifications are required for any of these steps,
although some source-level care must be taken to get step
(c) to work.
2) No, it ain't UNIX, it's RasNIX. Sorry, but I didn't have time
to make a 4.2 BSD desk accessory. In particular, I am sorry
to say that I never got around to putting in wildcards.
3) It is pretty big for a desk accessory (about 9.3K). It also wants
another 1K of space for program globals when it is opened. It
should Beep and exit if there isn't enough memory.
4) RasNIX hasn't been extensively tested, so let me know if there are
any problems.
Hope you enjoy it! The source and desk accessory are in the public domain,
so do with them what you will (but don't make a profit from them).
Scott Gillespie
Reed College
Portland, OR 97202
-------------------------------------------
RasNIX.doc
RasNIX is a pseudo-UNIX emulator, which allows you to examine and manipulate
(to some extent) the files on your disks. Instead of being iconically
oriented, RasNIX provides a command-line-oriented shell, and supports
several standard UNIX commands (as well as some Mac specific commands).
When you start up RasNIX (by selecting 'RasNIX' from the desk accessory menu)
you will see the window divided into two sections by a horizontal line: a
small top section with prompt and cursor, and a large lower section. You can
type in RasNIX commands at the top, and any output (for instance when you
list files) will appear in the bottom section.
Whenever you type any commands which cause RasNIX to list more files than
will fit in the window, you will be prompted with the following line:
More?
Type a 'y' or a <Return> to continue with the file listing, or type <Enter>
to abort the listing.
RasNIX ignores case: you can type commands or filenames with whatever
combination of lower and upper-case characters you desire.
When in UNIX, one has a number of directories: in RasNIX, each disk is seen
as a directory. Standard UNIX commands referring to directories (such as
'cd') will refer to disks, in RasNIX. When you first start up RasNIX, you
are in the Home directory (where typing 'ls' will list all of the disk
names).
You can specify a file from a different disk than the current directory by
using the syntax:
DiskName:FileName
(unlike UNIX's use of '/' to indicate pathnames).
Here is a summary of the current RasNIX commands:
ls (List). Ls lists all of the files in the current directory (disk).
If you are in the home directory (see 'cd'), ls will cause all disk names to
be listed (for those disks which have been inserted since RasNIX was started
up. If you type '-l' as an argument to ls:
ls -l
the size (in bytes) of each file will be listed along with the filename. If
you are in the home directory, the number of used bytes will be listed for
each disk (for floppies, 400K-Number listed = free space).
cd (Change Directory). Cd causes the base directory to change to the
disk specified by the argument accompanying Cd:
cd A+
changes the base directory to the disk 'A+'. After you type cd, you can type
the name of any disk listed in the home directory. If you just type cd (with
no argument), you will go to the home directory. In the home directory,
typing 'ls' will cause all of the known disk names to be listed. Another
obscure option is to type a volume reference or drive number, preceded by a
colon:
cd :-2
The command above will change directories to the disk with a volume reference
number of -2. The following command:
cd :2
will change directories to the external disk (positive numbers are drive
numbers: 1=internal, 2=external, etc.). See Inside Macintosh (File Manager)
for details on volume reference and drive numbers.
pwd (Print Working Directory). When you type this command, RasNIX will
print out the name of the current directory.
date Print out the current date.
time Print out the current time.
help A brief summary of all possible RasNIX commands is displayed.
info Information about RasNIX is displayed.
wc Use this command to find out the size of any individual file, or of
the current working directory (except Home). If, for example, your working
directory was 'Support', and you wanted to find out how big the file
'aquarium.src' was, just type the following:
wc aquarium.src
RasNIX will print the size of the file in bytes. Just typing 'wc' with no
arguments will cause RasNIX to print the size of the current working
directory in bytes.
separ (Separator). This is not a standard UNIX command. Often, Macintosh
file or disk names contain spaces. RasNIX will understand any disk or
filename typed *unless the name BEGINS with a space*. If you want to refer
to a disk or file that begins with a space, use this command to specify
another character (e.g. comma (',')) to be the character that separates the
command from its operand. If you type 'separ' all by itself on the command
line, the default (separate command/operand at spaces) will be set. If you
give a character as an argument to separ, all further parsing will be done by
breaking the command line with that character. For example, if you want to
do a 'cd MyDisk' (where ' MyDisk' begins with a space):
separ , (Set the separator char to a comma)
cd, MyDisk ('cd' and ' My Disk' are each seen as separate words).
separ (Set the separator character to the default).
It is always o.k. for a filename to contain embedded spaces (e.g. 'Rascal
Work File').
eject 'Eject' followed by a disk name, will cause the specified disk to be
ejected (if it is currently mounted).
forget Same action as 'eject', plus makes the Macintosh forget about the
disk (for experts, forget=unmount). Don't 'forget' any disks that you might
want to keep using.
rm (Remove) Causes the specified file to be deleted from disk:
rm test.obj (deletes test.obj).
logout Causes RasNIX to halt: the desk accessory will be closed.
----------------------------------