This manual page documents the vmscd utility.
vmscd reads the contents of any OpenVMS CD-ROM or more generally any ODS-2 disk volume. Using vmscd, the user can navigate on the CD-ROM, list the content of directories, extract files, view the content of OpenVMS text files or convert them into UNIX format.
ODS-2 (On-Disk Structure, level 2) is the name of the most common file-system on OpenVMS, including CD-ROM's. Starting with OpenVMS V7.2, a new variant (ODS-5) has been introduced. However, all Digital/Compaq CD-ROM's remain in ODS-2 format.
vmscd is a command-line utility. It recognizes several commands (see the COMMANDS section below). Commands can be entered in two modes:
vmscd recognizes the following options on the command line:
Since accessing a CD-ROM device may be quite slow, especially when spining up the volume, vmscd uses an internal LBN cache. This cache serves the same purpose as the system cache for the classical UNIX file-systems. It retains the content of each LBN (Logical Block Number) on the volume. When the same block is read later on, the cached content will be used.
The LBN cache has a maximum size. When this size is reached, the least recently used block is dropped from the cache.
The LBN cache is divided into two logical areas: the data and the meta-data. The data are the contents of the files on the CD-ROM, excluding the directory files. The meta-data include all file-system structures and the contents of the directory files. To prevent the data from starving the meta-data cache during the copy of large files, the two areas of the cache can be separately sized. See the descriptions of options -c and -m.
Note that the LBN cache is used only when vmscd directly accesses a block device. When the specified device is actually a plain UNIX file containing the physical image of a CD-ROM, the LBN cache is disabled since the UNIX cache is implicitely used.
OpenVMS uses an intermediate level between the file-system and the application: the Record Management Services (RMS). Consequently, the physical content of a file (as read from the file-system) is generally not what the OpenVMS applications will see using RMS. The ODS-2 volume structure holds various file attributes which are interpreted by RMS to present the correct logical content of the file to the application.
When a file is copied from an ODS-2 volume to a UNIX file system, these attributes are lost. If the file is later copied from this UNIX file system to an OpenVMS system, the OpenVMS applications will likely not correctly interpret the file.
To avoid this, three different methods are provided by vmscd:
vmscd recognizes several commands. Empty lines or lines starting with a # are considered as comments and are ignored.
The output of any vmscd command can be redirected to a file using > or >> or piped to the standard input of a shell command using |. The interpretation of >, >> and | is identical to the shell.
The rest of this section describes all vmscd commands in details.
cat [options] cdrom-files ...
This command copies files from the CD-ROM to the standard output. These files must be text files (in any supported OpenVMS text format). They are converted to UNIX text format before being copied.
Options:
cd [options] [path]
Change the current working directory on the CD-ROM. The root of the disk is designated by /. Without path argument, the cd command moves back to the root of the CD-ROM.
Options:
cp [options] cdrom-files ... destination
This command copies files from the CD-ROM to the UNIX file system. If multiple input cdrom-files are given, the destination must be a directory.
Options:
dump [options] [cdrom-file]
This commands dump the content of a file in hexadecimal and ASCII format.
If a cdrom-file is specified, the VBN's (Virtual Block Numbers) of the file are dumped. By default, the complete content of the file is dumped. Use the option -s to specify a starting block number (VBN's are numbered from 1).
If no file is specified, LBN's (Logical Block Numbers) are dumped from the CD-ROM. The options -s and -c must be given. They specify the starting LBN and count of blocks to dump. (LBN's are numbered from 0).
Options:
exit
This command exits from the vmscd application. This is a synonym to the quit command.
help [options] [command-name...]
This command describes the vmscd commands. Without parameter, it displays the list of available commands. If one or more command-name are specified, a description of these commands is displayed.
Options:
lcd [options] [path]
This command changes the current working directory of the vmscd process. This is the UNIX working directory, on the UNIX file system. Without path argument, the home directory of the user is used.
Options:
ls [options] [path...]
This command lists files on the CD-ROM. Without path argument, it lists files in the current CD-ROM working directory.
Options:
more [options] cdrom-files ...
This command is similar to cat. It copies files from the CD-ROM to the standard output. These files must be text files (in any supported OpenVMS text format).
In addition, the output of the command is piped into a pager program. First, the command looks for an executable file named less in the directories from the PATH environment variable. If it is not found, it looks for one named more.
Options:
pwd [options]
This command prints the current working directory on the CD-ROM.
Options:
quit
This command exits from the vmscd application. This is a synonym to the exit command.
stat
The stat command displays statistics about the usage of the local LBN cache. This command takes no parameter and no option.
The command-line option -s of vmscd is equivalent to performing a stat command before exiting.
!shell-command
The character ! executes a shell command.
The vmscd utility works on little-endian systems (Intel, Alpha) only. It has been currently tested on Linux for Intel only.
The creation of the attribute files for the UCX NFS client is not fully implemented. Moreover, when this is implemented, due to a bug in UCX the attribute files will not be correctly read by versions of UCX earlier than 5.0.
Thierry Lelegard <lelegard@club-internet.fr>
Copyright is held by the author. The vmscd utility is covered by the "GNU GENERAL PUBLIC LICENSE" (GPL) and may be used and duplicated under the terms of the GPL.