Everything you ever wanted to know about VMS and were afraid to ask
---Under construction --
Help with all DCL commands can be found by typing HELP Command. This helper gives a quick guide to some of the commands you may need to know about, to find you way round the system. Note VMS is not case sensitive - use upper or lower case as you wish. Commands may be abbreviated to their first few letters (you need enough letter to be unambiguous, usually 3 by sometimes 2).
- DIRECTORIES - gives a guide to your directory structure and how to move around the different directories.
- FILES - gives a brief description of file names and how to access them, change them, edit them etc.
- COMMANDS - gives a brief description of a few useful DCL commands.
Directories
When you log into the uVAX as user
PULSAR, your current directory will be
DISK$DATA:[PULSAR].
Directory names are enclosed in [ ] and subdirectories separated by dots.
- DISK$DATA:[PULSAR] the top of the pulsar group's data directory tree.
- DISK$DATA:[PULSAR.OBS] Directory for configuration files
- DISK$DATA:[PULSAR.OBS.PSRDATA_1] data files for Lovell timing data
Changing directory
Moving to another directory is done with the command
SET DEFAULT diskname:[directoryname]
This can be abbreviated to
SET DEF [dir] or
SD [dir]. You can give the full name of the disk and directory.subdirectory eg.
SD $DISK1:[PSR.OBS] or you can move relative to your current directory ( . = current, - =up).
current directory command result
DISK$DATA:[PULSAR] SD [.OBS] DISK$DATA:[PULSAR.OBS]
DISK$DATA:[PULSAR.OBS] SD [-] DISK$DATA:[PULSAR]
DISK$DATA:[PULSAR.OBS] SD [-.BACKUP] DISK$DATA:[PULSAR.BACKUP]
Typing
HELP SET DEF at the prompt will give the full VMS help text for this command.
Shortcuts and Aliases
To make it easier to get around, a number of shotcuts and aliases are setup in various pulsar login scripts.
Shortcuts
cat | TYPE |
DD | DIR/DAT/SIZE=ALL/PROT |
DDD | DIR/DAT/SIZE=ALL/PROT *.DIR |
DDS | DIR/DAT/SIZE |
DEFACQ | SET DEFAULT $DISK1:[PSR.OBS] |
DEFCAL_1 | SET DEFAULT DD:[PULSAR.OBS.CAL_1] | |
DEFDATA_1 | SET DEFAULT DD:[PULSAR.OBS.PSRDATA_1] | |
DEFOBS | SET DEFAULT DD:[PULSAR.OBS] |
DEL | DELETE/CONFIRM |
DIS*KS | SHOW DEVICES/MOUNTED D |
HO*ME | SET DEF $DISK1:[PULSAR] |
ll | DIR/DAT/SIZE=ALL/PROT |
lll | DIR/DAT/SIZE=ALL/PROT *.DIR |
ls | DIR |
more | TYPE/PA |
rm | DELETE/CONFIRM |
T132 | SET TERM/WIDTH=132 |
T80 | SET TERM/WIDTH=80 |
TBIO | MONITOR PROCESS/TOPBIO |
TCPU | MONITOR PROCESS/TOPCPU |
xdisplay | SET DISP/CRE/TRAN=TCPIP/NODE= |
Aliases
DD | DISK$DATA: |
OBSUTILDIR | $DISK1:[PSR.OBS.UTIL] |
PSROBSDIR | $DISK1:[PSR.OBS] |
PSRACQ_1_DATA | Current system 1 Data file |
PSRACQ_1_DATADIR | DISK$DATA:[PULSAR.OBS.PSRDATA_1] |
PSREPHDIR | DISK$DATA:[PULSAR.OBS.PSREPH] |
PSRLIST_1 | DISK$DATA:[PULSAR.OBS]PSRLIST_1.DAT |
PSROBSLIST_2 | DISK$DATA:[PULSAR.OBS]PSROBSLIST_2.DAT |
$EXABYTE | _MKA400: |
Where am I?
You can find your current position using the command
SHOW DEFAULT, which can be abbreviated to
SHO DEF or possibly
pwd.
Files
File names can be a combination of almost any letters and numbers (a notable exception is +) and consist of a name, a dot, an extension and version number, e.g.} NAME.EXT;1.
No file is ever lost or overwritten, any edit or copy command produces a file with a new version number. A file must be deleted to get rid of it.
File List
To get a list of the files in the current directory use the command
DIRECTORY. This can be abbreviated to DIR or maybe
ls. More information can be produced by adding modifiers to the command.
- DIRECTORY/DATE/SIZE/PAGE (or DIR/DAT/SIZ/PA or DDS/PA) will list the files with their creation date, size in blocks (1 block = 512 bytes), a page at a time.
- DIR *.FOR will list all the files in the current directory which have any name (*) and the extension FOR.
- DIR/SINCE="1-FEB-1994 17:00" will list all the files in the current directory created since the given date.
- DIR/SINCE=YESTERDAY will list all the files in the current directory created since the start of yesterday
- DIR/SINCE=5 will list all the files in the current directory created since 5 am on the current day. (Note the VAX clock is held at GMT).
- DIR [CORR...] will list all the files in [CORR] and its subdirectories.
Moving Files
Files can be copied to another directory, or the same directory with another file name with the command
COPY. Any part of the dilename (disk, name, extension) that is ommitted will be given th at part of the original name.
- COPY TESTL.FOR .OLD will make a copy of TEST.FOR in the current directory, called TEST.OLD. (The original is left unchanged).
- COPY [-.DATA]TEST.FOR NEWTEST.FOR copies TEST.FOR in the directory [rpfits.data] (assuming that you are currently in [rpfits.sched]) to NEWTEST.FOR in the current directory.
- COPY FILE1.DAT;1+FILE1.DAT;2 FILENEW.DAT copies first version of the file plus second version of the file to FILENEW.DAT.
Commands
The up and down arrows on the keyboard will recall previous commands. These command lines can be edited using the backarrow, and delete keys. The following commands may be useful .
COPY | srcfile destfile | to copy files |
RENAME | oldfile newfile | to move files |
SET DEFAULT | directory | to change current working directory |
SHO DEFAULT | | to show current working directory |
LOGOUT | | to finish session |
ED | FILENAME | edit file with VMS editor |
EMACS | FILENAME | edit with emacs. |
TYPE/PAGE | FILENAME | type filename, page by page ie more |
DELETE | FILENAME;VERSION | deletes file. |
PURGE | FILENAME | deletes all except the most recent version of a file. |
PURGE/KEEP=N | FILENAME | as above, but keep most recent n versions |
PRINT/QUEUE=CAXTON | FILENAME | Print POSTSCRIPT file to printer caxton, in Merlin Visitors room. |
PRINT/QUEUE=IRIS | FILENAME | Print POSTSCRIPT file to colour printer iris, in Merlin Visitors room. |
More information on these and other VMS commands can be found by typing
HELP command. To leave help hit return for each level reached.
Editing
Typing
ED filename will bring up the VAX Editor to create or edit a file. In an existing file you can use the arrow keys to move around, then add new data or delete old data. (The editor always works in insert mode ie anything typed will be inserted at the current cursor position, you can't type over existing data.) Commands are summoned using the right hand key pad (and the small block of keys to the left of this). This makes using the editor from a Unix box rather inadvisable!) .
FIND | Prompts for string to search for. |
SELECT | Places a mark in the text.All text between the mark |
| and the current cursor position will be highlighted. |
REMOVE | Cuts highlighted text and saves it in a paste buffer |
INSERT HERE | Inserts the contents of the paste buffer at the |
| current cursor position. |
NEXT SCREEN | Page down |
PREV SCREE | N Page up |
BACKSPACE | Deletes previous character |
KEYPAD , | Delete character under cursor |
PF1, SELECT | Cancels SELECT |
PF1 then 4 | Goto End of file |
PF1 then 5 | Goto Start of file |
PF2 | HELP |
PF3 | Repeats FIND |
CTRL-Z EXIT | Saves changes and exits editor |
CTRL-Z QUIT | Exits editor without saving changes |
You can also use
emacs, as long as you can remember the key commands! Editing a file creates a version of the file with a higher version number. You will always have the last version to go back to if necessary. (
DIR/DATE/SIZE or
DDS will show all the files, with version numbers and creation dates).
0 comments:
Post a Comment