		v7fs - A Version 7 Unix Filesystem Access Program
		=================================================

This is a heavily updated version of the v7 version 7 Unix filesystem access
program as written by Mike Karels back in the early 1980s. The original
program assumed that it was being compiled on a PDP-11 and was written in
'old' style C.

I took the program, updated the code to follow modern conventions, and then
made it portable. The opportunity was taken to add a few new commands that
would allow for even more spying on the internals of the V7 filesytem. To
anyone familiar with the original program, here are the new commands and
features:

dumpblk		hex-dump of a data block
dumpboot	hex-dump of the boot block
lcd		rename of the original c7d command
printsb		print details of the contents of the super block

The 'ls' listing is now sorted as per the standard 'ls' command to make it
look more normal.

The purpose behind the program is to allow easy access to a V7 filesystem
image from the native Unix system. Many people running V7 Unix are doing so
within an emulator running on some other flavour of Unix, and easy access to
the files resident on the V7 filesystem can be useful.


Compiling the Program
---------------------

It is possible that simply typing 'make v7fs' will do all that is required.
By default, the makefile will try and use the GNU C compiler, gcc, and
install the compiled program in /usr/bin and the manual page in
/usr/man/man1. If these defaults are not satisfactory, then simply edit the
Makefile, or compile it manually.

The program makes no particular assumptions about the host operating system,
and may even work under MS-DOS. If the program fails to work on your
particular operating system/processor combination, find the following lines
near the top of v7fs.c, and change them to match your system:

/*
 *	PDP-11 data types & lengths, you may need to edit these.
 */
typedef	unsigned char	int8;
typedef	unsigned short	int16;
typedef	unsigned int	int32;

These defaults will be reasonable for most people, they assume that a
'char' is eight bits long, a 'short' is 16 bits long, and an 'int' is 32
bits long.

The program was ported using Linux running on an i486, and it has been run
on a DEC Alpha running Linux without any modifications. Further tests
results are expected.


Running the Program
-------------------

The full details of the program can be found in its manual page, but briefly
it is run as:

v7fs <filename>

where filename is either a disc partition containing a V7 filesystem, or a
standard Unix file containing a V7 filesystem image. Once it has started,
the program will print a '*' prompt and will accept a number of commands. A
full list of commands can be found by giving '?' as a command, the commands
are:

ls [-i] [dir]: list directory contents, current dir default
cd name: change to directory 'name'
cat name1: print file 'name1' on terminal
cp name1 [name2]: copy internal file 'name1' to external 'name2'
	name2 defaults to name1.
	(An i-number can be used instead of name1 for cp or cat.)
cpdir: copy all files in current internal directory
	to current external directory
lcd name: change to local directory 'name'
printi ino ...: print contents of inode 'ino'
printblk blk ...: print contents of block 'blk'
printsb: print contents of the super block
dumpblk blk ...: hex dump of block 'blk'
dumpboot: hex dump of the boot block
cpblk file blk ...: copy contents of 'blk' to external file 'file'
	(append to file if it exists)
rootino ino: read directory with inode 'ino', making it
	the root directory
! : shell escape; the rest of the line is passed to the shell
q or ^d: quit

Please note that the V7 filesystem does not have any signature and so it is
possible to try and read a non-V7 filesystem. In this case the results of
the program will be unpredictable, it may even hang, but it will stop given
a control-C in the right place.

Jonathan
