Module 1 — File & Directory Operations
Overview
This module covers essential OpenVMS file and directory operations used daily by system engineers and operators. Topics include directory navigation, file versioning, wildcard usage, file attributes, and basic BACKUP operations.
Exam: Multiple‑Choice Questions
1. Which command recursively searches all subdirectories for a file named DATA.LOG?
2. Which command displays all versions of a file named REPORT.TXT?
3. Which command shows detailed file attributes such as record format and allocation?
4. Which wildcard pattern lists all files beginning with LOG and ending in .DAT?
5. Which BACKUP command creates a saveset of the entire DISK$DATA volume?
Hands‑On Exercises
Exercise 1 — Navigate Directories
- Display your current default directory.
SHOW DEFAULT - Change to the top‑level directory of your disk.
SET DEFAULT [000000] - Navigate to a nested directory of your choice.
SET DEFAULT [.SYS$COMMON.SYSMGR]
Exercise 2 — Search for Files
- Find all
.LOGfiles under your home directory:
DIRECTORY [...]*.LOG - Find all versions of a specific file:
DIRECTORY filename.ext;*
Exercise 3 — Inspect File Attributes
- Choose a file and display its full attributes:
SHOW FILE/FULL filename.ext - Identify:
- Record format
- Allocation
- Creation date
- Owner
- Protection mask
Exercise 4 — Work with File Versioning
- Create multiple versions of a file:
EDIT/TPU TEST.TXT(save several times) - List all versions:
DIRECTORY TEST.TXT;* - Purge old versions:
PURGE TEST.TXT
Exercise 5 — Perform a BACKUP Operation
- Create a test directory with files.
- Run a directory‑level backup:
BACKUP [.TEST...]*.* TEST.BCK/SAVE/LOG - Restore the saveset to a new directory.
BACKUP TEST.BCK [.RESTORE]/LOG
Scenario‑Based Troubleshooting Challenges
Scenario 1 — Missing File
A user claims a file named RUN.LOG “disappeared.”
You must locate it.
Expected approach:
- Use recursive DIRECTORY
- Check for versioning
- Check for accidental renames
- Check for protection issues
Scenario 2 — Disk Filling Up
A volume is nearly full.
You must identify large files and old versions.
Expected approach:
DIRECTORY/SIZE=ALLDIRECTORY [...]*.*;*PURGESHOW DEVICE/FULL
Scenario 3 — Incorrect File Format
An application fails because a file has the wrong record format.
Expected approach:
SHOW FILE/FULL- Identify record format mismatch
- Use CONVERT/FDL to rebuild
Answer Key
Answers are included inline with each question.