Listing and Finding Files

DCLUnixNotes
DIRECTORYls
DIRECTORY/SIZE/DATE/OWNER/PROTECTIONls -lSizes are in 512-byte blocks.
DIRECTORY/FULL LOGIN.COMstat .profileAlso shows record format and other RMS attributes Unix has no concept of.
DIRECTORY [...]*.LOGfind . -name '*.log'[...] means "this directory and everything below it".
DIRECTORY/SINCE=TODAYfind . -maxdepth 1 -newermt today-newermt is GNU and BSD find; both Linux and macOS have it.
DIRECTORY/SIZE=ALLOCATION/GRAND_TOTAL [...]du -sh .Total space used by this tree, in blocks.
SHOW DEVICES Ddf -hLists disks with free blocks.

Working with Files

DCLUnixNotes
TYPE NOTES.TXTcat notes.txt
TYPE/PAGE NOTES.TXTless notes.txt
TYPE/HEAD=10 NOTES.TXThead -n 10 notes.txt/HEAD and /TAIL need OpenVMS V8.4 or later.
TYPE/TAIL=10 NOTES.TXTtail -n 10 notes.txt
CREATE NOTES.TXTcat > notes.txtType the text, then end with Ctrl-Z (Ctrl-D on Unix).
COPY A.TXT B.TXTcp a.txt b.txt
BACKUP [.SRC...]*.*;* [.DEST...]cp -R src destBACKUP is the usual way to copy a whole tree with its versions and attributes.
RENAME A.TXT B.TXTmv a.txt b.txt
DELETE NOTES.TXT;*rm notes.txtA version is required: ;* deletes all of them, ;3 just one.
DELETE/CONFIRM *.TMP;*rm -i *.tmp
PURGE(none)Deletes old versions, keeping the newest. Unix files have no versions to purge.
APPEND A.TXT B.TXTcat a.txt >> b.txt
SET FILE/ENTER=ALIAS.TXT NOTES.TXTln notes.txt alias.txtA second directory entry for the same file, like a hard link. There are no symlinks; logical names fill that role.
DIFFERENCES A.TXT B.TXTdiff a.txt b.txtWith one argument it compares the two newest versions of the file.
SORT IN.TXT OUT.TXTsort in.txt > out.txt
DUMP FILE.BINhexdump -C file.bin
CHECKSUM/ALGORITHM=MD5 FILE.BINmd5sum file.binThe result goes into the symbol CHECKSUM$CHECKSUM; show it with SHOW SYMBOL CHECKSUM$CHECKSUM. On macOS it's md5.
EDIT/TPU NOTES.TXTnano notes.txtEVE, the TPU editor, is the closest thing to nano or vi. Ctrl-Z saves and exits.

Directories

DCLUnixNotes
CREATE/DIRECTORY [.NOTES]mkdir notes
CREATE/DIRECTORY [.A.B.C]mkdir -p a/b/cIntermediate directories are created automatically.
SET SECURITY/PROTECTION=(O:RWED) NOTES.DIR;1(none)Directories aren't deletable by default; this makes one deletable.
DELETE NOTES.DIR;1rmdir notesMust be empty. There's no classic one-step rm -r: delete the files, then the directories from the bottom up.

Ownership and Permissions

VMS protection has four classes (System, Owner, Group, World) and four rights (Read, Write, Execute, Delete), plus optional ACLs.

DCLUnixNotes
SHOW SECURITY NOTES.TXTls -l notes.txt
SET SECURITY/PROTECTION=(W:RE) NOTES.TXTchmod o+rx notes.txt
SET SECURITY/PROTECTION=(G,W) NOTES.TXTchmod go-rwx notes.txtA class with no rights listed loses all of them.
SET SECURITY/OWNER=[200,201] NOTES.TXTchown user:group notes.txtOwners are UICs: [group,member].
SET SECURITY/ACL=(IDENTIFIER=JDOE,ACCESS=READ) NOTES.TXTsetfacl -m u:jdoe:r notes.txtOn macOS: chmod +a "jdoe allow read" notes.txt.
SET PROTECTION=(S:RWED,O:RWED,G,W)/DEFAULTumask 077Default protection for new files.

Processes and Jobs

DCLUnixNotes
SHOW SYSTEMps -e
SHOW PROCESSps -p $$Your own process. /ALL adds quotas, privileges and devices.
MONITOR PROCESSES/TOPCPUtopCtrl-Z to quit.
STOP/IDENTIFICATION=2040011Ckill -9 1234STOP is immediate; there's no polite SIGTERM equivalent.
SET PROCESS/PRIORITY=2renice 10 -p $$Higher numbers mean higher priority on VMS, the opposite of nice values.
RUN PROG.EXE./prog
MCR AUTHORIZE/usr/sbin/progMCR runs a program from SYS$SYSTEM and can pass it arguments, much like running a tool from /usr/sbin.
SPAWNshA subprocess shell. LOGOUT returns to the parent.
SPAWN/NOWAIT @LONGJOB.COM./longjob.sh &
SUBMIT JOB.COMnohup ./job.sh &Runs in a batch queue and writes a log file to your home directory.
SUBMIT/AFTER="TOMORROW+02:00" JOB.COMecho ./job.sh | at 02:00 tomorrowNo cron: recurring jobs resubmit themselves at the end of each run.
SHOW ENTRYatq
DELETE/ENTRY=123atrm 123
WAIT 00:00:05sleep 5
Ctrl-YCtrl-CInterrupt the running program.
Ctrl-TCtrl-TShows what the process is doing. Works on macOS and BSD (SIGINFO), not on Linux.

Shell, Symbols and Scripts

DCL symbols act like shell variables, and logical names act like environment variables and symlinks combined.

DCLUnixNotes
NAME = "value"NAME=valueLocal to the current command procedure.
NAME == "value"export NAME=valueGlobal: visible everywhere in your process.
SHOW SYMBOL NAMEecho $NAME
WRITE SYS$OUTPUT "Hello, ''NAME'"echo "Hello, $NAME"Inside quotes, ''NAME' substitutes the symbol.
LL :== DIRECTORY/SIZE/DATEalias ll='ls -l'
DEFINE WORK SYS$LOGIN:[NOTES]export WORK=~/notesUnlike a variable, a logical works anywhere a path goes: DIR WORK:.
SHOW LOGICALenv
DEASSIGN WORKunset WORK
@SCRIPT.COM A Bsh script.sh a bArguments arrive as P1 to P8.
IF F$SEARCH("NOTES.TXT") .NES. "" THEN TYPE NOTES.TXT[ -e notes.txt ] && cat notes.txt
SHOW SYMBOL $STATUSecho $?Odd values mean success, even values mean failure.
ON ERROR THEN EXITset -e
SET VERIFYset -x
INQUIRE ANSWER "Continue"read -p "Continue? " ANSWER
PIPE SHOW SYSTEM | SEARCH SYS$PIPE SSHps -e | grep sshPipes need the PIPE prefix; SYS$PIPE is the standard input.
PIPE SHOW SYSTEM > PROCS.TXTps -e > procs.txtMany commands also accept /OUTPUT=file.
RECALL/ALLhistory
HELP SEARCHman grep
SYS$LOGIN:LOGIN.COM~/.profileRuns at each login.
SYS$MANAGER:SYLOGIN.COM/etc/profileRuns at every user's login.
SYS$MANAGER:SYSTARTUP_VMS.COM/etc/rc.localSite-specific startup at boot. The modern Linux counterpart is a systemd unit.

Users and Privileges

DCLUnixNotes
SHOW USERSwho
WRITE SYS$OUTPUT F$GETJPI("","USERNAME")whoami
SHOW PROCESS/PRIVILEGESid
SET PASSWORDpasswd
SET PROCESS/PRIVILEGES=SYSPRVsudo -sTurns on a privilege your account is already authorized to hold. No password prompt.
MCR AUTHORIZE ADD JDOE/...useradd jdoeSee the Users section of the cheat sheet for the full ADD command.
MCR AUTHORIZE MODIFY JDOE/FLAGS=DISUSERusermod -L jdoe
MCR AUTHORIZE REMOVE JDOEuserdel jdoe
SHOW QUOTAquota
LOGOUTexit

System Information and Admin

DCLUnixNotes
SHOW TIMEdate
SHOW SYSTEM/NOPROCESSuptimeThe header line includes the uptime.
WRITE SYS$OUTPUT F$GETSYI("VERSION")uname -r
WRITE SYS$OUTPUT F$GETSYI("NODENAME")hostname
SHOW MEMORYfree -hOn macOS: vm_stat.
SHOW CPUlscpuOn macOS: sysctl -n machdep.cpu.brand_string.
SHOW DEVICES/FULL DKA0:lsblkOn macOS: diskutil info disk0.
TYPE SYS$MANAGER:OPERATOR.LOGjournalctlSystem messages. On macOS: log show.
SHOW ERRORdmesgDevice error counts rather than a kernel log.
PRODUCT SHOW PRODUCTdpkg -lInstalled software. Elsewhere: rpm -qa, brew list.
PRODUCT INSTALL OPENSSHapt install openssh-serverPCSI kits are installed from files in the current directory, not a remote repository.
PRODUCT REMOVE OPENSSHapt remove openssh-server
MOUNT DKA100: DATAmount /dev/sdb1 /mnt/data
DISMOUNT DKA100:umount /mnt/data
INITIALIZE DKA100: DATAmkfs /dev/sdb1Erases the disk.
ANALYZE/DISK_STRUCTURE DKA0:fsck /dev/sda1
BACKUP [...]*.*;* SAVE.BCK/SAVE_SETtar cf save.tar .
BACKUP/LIST SAVE.BCK/SAVE_SETtar tf save.tar
BACKUP SAVE.BCK/SAVE_SET [.RESTORE...]tar xf save.tar -C restoreRestores into a RESTORE subdirectory.
REPLY/ALL "Going down in 5 minutes"wall "Going down in 5 minutes"
@SYS$SYSTEM:SHUTDOWNsudo shutdown -h nowInteractive: it asks whether to reboot, so it also covers shutdown -r.

Networking

DCLUnixNotes
TCPIP SHOW INTERFACEip addrOn macOS: ifconfig.
TCPIP SHOW ROUTEip routeOn macOS: netstat -rn.
TCPIP PING example.comping example.com
TCPIP TRACEROUTE example.comtraceroute example.com
TCPIP SHOW HOST example.comhost example.com
TCPIP SHOW DEVICE_SOCKETss -tanOpen sockets. On macOS: netstat -an.
TCPIP SHOW SERVICEsystemctl list-units --type=serviceNetwork services and whether they're enabled.
TCPIP ENABLE SERVICE SSHD22systemctl start sshd
TCPIP SET HOST FILESERVER/ADDRESS=192.0.2.10echo "192.0.2.10 fileserver" >> /etc/hostsAdd a static host name.
SSH user@hostssh user@hostIf SSH isn't recognised, run @SSH$ROOT:[BIN]SSH$DEFINE_COMMANDS.COM ALL first.
FTP hostftp host
TELNET hosttelnet host
Unix commands are shown in their common Linux form; macOS differences are in the notes. Check HELP on VMS and man on Unix for the full options.

OpenVMS and the OpenVMS logo are trademarks of VMS Software, Inc. This is an unofficial fan reference.

A Boxing Octopus Creative Project. Copyright 2026 All rights reserved.