v7 Scripts

UNIX Version 7 (aka "the last true UNIX"), originally created for the PDP-11 in 1979, is about the oldest functional version of UNIX that exists. It introduced many utilities and functionality that are now taken for granted, such as awk, tar, make, a portable C compiler and library routines such as stdio and malloc, the bourne shell and with it environment variables. Thanks to PDP-11 emulators, and even a port of v7 to x86, it is fairly easy to run the system today on a virtual machine.

Having that said, it can be quite a challenge for a modern user to use a text only operating system without internett. And even for seasoned console users, v7 has a few quirks and weird surprises. For example, the system boots into read-only single user mode by default, so that the user can manually check the disk integrety with fsck (located in /etc/fsck(!)), before loging out and loging in to multiuser mode. The most annoying aspects I found, was a qwerty only keyboard layout (I'm a dvorak user), no shell history or command completion, and that every so often commands randomly wouldn't run.

The last problem may be due to bugs in VirtualBox, since I have seen similar problems also on recent systems. (a keyboard reading issue perchance..?) But given the fact that we are talking about an operating system thats 40 years old, designed to run on a typewriter, connected to a computer with a few kilobytes of memory, with large cabinets of spinning magnetic tapes for external storage, it's surprisingly useful. Given some basic knowledge of ed, sed, grep, sh and other essential utilities, you can actually do a lot of stuff on v7. Serious programming with C, and document processing with troff is also possible. (pro tip: read The UNIX Programming Environment by Kernighan and Pike, or possibly The UNIX Haters Handbook - depending on your mood) In fact I'm quite amazed at how little has changed in the four decades since this version of UNIX was released. This is both a pleasent surprise, and a bit sad...

Installing the files onto a virtual v7 system is somewhat tricky, you basically have to extract the tarball on the host system (the v7 version of tar is not compatible with modern versions), make a floppy disk image that includes them, then mount that disk image onto the virtual machine. From there v7 can read the floppy disk, and you can copy the files into your home directory.

Assuming you have recreated the filepaths in the tarball in your home directory on v7, and copied over the files (you can of course copy the scripts directly into /usr/bin and the manuals into /usr/man/man[1-8] if you want), you can change the PATH line in ~/.profile to also search for programs in your home directory:

PATH=$HOME/bin:/bin:/usr/bin:/usr/ucb; export PATH

There is no MANPATH in v7, you need to copy your local manpages into the system manuals in order to read them with man:

for dir in man/*; do cp $dir/* /usr/$dir; done

Of course you can also just read the manpages manually:

nroff -man man/man1/script.1 | more

Projects

Downloads