*nix Tip of the Day: VMS

Okay, so this is maybe a little unusual, but today's "*nix Tip of the Day" isn't about Unix/Linux/etc. at all. Instead, it is about their antiquated archenemy: VMS. First, a little bit of history:

History

Way back in 1970, the PDP-11 was hot stuff. Ken Thompson, Dennis Richie, Brian Kernighan, and others at Bell Labs were writing what would become Unix for the PDP-11 (well, for the PDP-7 at first, but nobody talks about that). Unix was a huge improvement over what DEC shipped with the PDP-11, DOS-11 and RT-11. This couldn't stand, so Dave Cutler at DEC designed VMS. It was a new operating system, with lots of fancy features, like networking and, uh, lots of upper-case letters.

VMS and Unix sort of battled on. Or so some people would have you think. Really, Unix won early on and VMS stumbled along with corporate financing and an obnoxiously difficult-to-use interface. It passed from DEC to Compaq to HP, from the PDP-11 to the Alpha to the Itanium. And it still lives on, churning away in scary back-rooms here and there.

Current Events

So, why do I bring this up? Well, as some of you may know, Harvey Mudd College has a few VMS machines around. The most well-known of these (to students) is thuban, which is a 667MHz DEC Alpha running OpenVMS 7.3-2. Today, I had the, uh, interesting experience of using it, and thought I'd share my impressions with my readers. You can see the proof of my VMS skills at my VMS homepage. That's right, I'm on the Internet. And on DECnet.

Connecting

So, VMS is old. I think I've gotten that point across. It's not necessarily a bad thing — VMS machine have uptimes measured in years. But it's a pain in the ass sometimes. For example, there is a version of SSH for VMS. But it costs money, and was a very late addition. So most machines (like ours) only support Telnet login. That's not a problem, right?

Getting about

VMS has a file system hierarchy which is sort of comparable to a Unix file system. You have a home directory. And maybe some directories inside that. And maybe even directories inside those, although that's pushing it. Below are some rather useful commands in VMS for getting around (note: the brackets are meant to be typed):

VMS CommandUnix Equivalent
SET DEFAULT SYS$LOGINcd ~
SET DEFAULT [000000]cd /
SET DEFAULT [.dirname]cd dirname
SET DEFAULT [-]cd ..
DIRls

On the plus side, you don't actually need to use all-caps on “modern” versions of VMS...

Editing a File

Okay, so you've found a directory that you want to put something in. Time to just pull up Vim? Nope! vi? Nope! emacs? Nope! ed? Getting closer! There are two ways to edit a file in VMS. The first is through CREATE, which is sort of similar to cat. Specifically, CREATE lets you input text, which it then overwrites the contents of the given filename with. Oh, one important thing I should note at this point — exiting. In Unix, you generally exit something like cat with ^D. In VMS, you use ^Z to exit pretty much all programs. Keep that in mind. Anyhow, VMS does have another editor besides CREATE (indeed, one that is actually able to edit). It's called EDIT. It's really nothing compared to vim or Emacs. I'd compare it most to an underpowered nano, or maybe edit.exe (which makes sense, since it inspired edit.exe). You can type in here, then press ^Z to drop back to a command line. At this point, you haven't really exited the editor. Well, you have, but it can still receive certain commands. To exit without saving, type quit at the command line. To exit and save, type exit. Yes, I think it's weird, too.

To look at your creation, you use the TYPE command. It's sort of a dumbed-down, one-direction cat.

I've summarized some editing commands below:

VMS CommandUnix Equivalent
CREATE filenamecat > filename
EDIT filenamenano filename
TYPE filenamecat filename
^Z^D

Other Stuff

VMS can do lots of other neat things. I'm assured of it by people who know. So far, the only thing I've used it for that was vaguely productive was to chat with our netadmin, Roger Weichman about VMS. Kind of a self-referential use, but shrug. Anyhow, there's a few more commands below. Enjoy.

VMS CommandUnix Equivalent
REPLY /userwrite user
PHONEtalk
FINGERfinger
FINGER userfinger user
SHOW SYSTEM /NOPROCESSuname or uptime
SHOW SYSTEMps
LOGOUTexit

References

If you want some help using VMS, here's a list of handy-dandy references:

I hope you've enjoyed this installment of "*nix Tip of the Day". Maybe I'll even do one about *nix again some day... Until then, ciao.


Want to comment on this? How about we talk on Mastodon instead? mastodon logo Share on Mastodon