Contents
Displaying the Files in a Directory
DIRECTORY -- Lists the
names of files in a VMS directory. If you type the DIRECTORY command with
no parameters or qualifiers, the command displays the files contained in
your current directory on the terminal. When you invoke the DIRECTORY command,
you can add one or more qualifiers to get additional information.
| Example: |
$ DIRECTORY |
| Result: |
Lists the names of all the files in your current directory. |
| |
|
| Example: |
$ DIRECTORY/SIZE=ALL/DATE |
| Result: |
Lists the names of all the files in your default directory
and, for each, shows the size (disk blocks used and disk blocks allocated),
and the date each file in the directory was created or modified. |
| |
|
| Example: |
$ DIRECTORY/PROTECTION |
| Result: |
Displays the protection level of the files in your directory.
Protection will be listed in the order: System, Owner, Group, World. |
For more information, type HELP DIRECTORY at the
VMS $ prompt.
<-- Back to the Top
Displaying a File
TYPE -- Displays a file
on your screen.
| Example: |
$ TYPE newfile.dat |
| Result: |
Displays the contents of the file 'newfile.dat' on your
terminal. |
| |
|
| Example: |
$ TYPE/PAGE newfile.dat |
| Result: |
Displays the contents of the file 'newfile.dat' on your
terminal, one screenful ("page") at a time. VMS will prompt you to press
<RETURN> to view the next page. |
To interrupt the TYPE command:
-
Press <CTRL>+C or <CTRL>+Y. (These
commands will permanently halt the processing.) The system then prompts
you to enter another command.
-
Press <CTRL>+S to temporarily suspend the display
of the file and the processing of the command. To resume, press <CTRL>+Q.
The resumed command will display lines beginning at the point where processing
was interrupted.
-
If you want to stop looking at screenfulls of the file when
you have used TYPE/PAGE, press Q, then <RETURN>. This
will return you to the VMS dollar prompt.
For more information, type HELP TYPE at the VMS
system prompt.
<-- Back to the Top
Compiling , Linking & Running C++ Programs
CXX, CXXLINK and RUN -- Compiles a C++ program, links the binary
object files into an executable file (.exe) and runs the program.
| Example: |
$ CXX sample |
| Result: |
Compiles a program called sample.cxx. |
| |
|
| Example: |
$ CXXLINK sample |
| Result: |
Combines the object files into a single executable file (.exe). |
| |
|
| Example: |
$ RUN sample |
| Result: |
Executes the program, sample. |
For more information, type HELP CXX at the
VMS $ prompt.
<-- Back to the Top
Combining
(Concatenating) Files
APPEND -- Adds the
contents of one or more specified (input) files to the end of the selected
(output) file. (NOTE: The APPEND command is similar in syntax and
function to the COPY command.) Normally, this command adds the contents of
one or more files to the end of an existing file without incrementing the
version number.
| |
|
input file |
output file |
| Example: |
$ APPEND |
test3.dat |
testpart.dat |
| Result: |
The APPEND command adds the contents
of the file 'test3.dat' (from the default disk and directory) to the file
'testpart.dat' (also located on the default disk and directory). |
NOTE: A full filename would have been used if the
file was located in a different directory or disk.
For more information, type HELP APPEND at the VMS
system prompt.
<-- Back to the Top
Copying
Files
COPY -- Creates a new
file from one or more existing files. You can use it to make copies of
files in your default directory, to copy files from one directory to another
directory, or to copy files from other devices.
NOTE: A file's protection and its corresponding
directories' protection must allow READ access in order for you
to be able to COPY the file.
| Example: |
$ COPY filename.old
filename.new |
| Result: |
Copies the contents of 'filename.old' to a file
named 'filename.new'. |
To use the VMS COPY command to copy a file from another
user's directory to your directory, you must be able to identify the location
of that user's directory and to specify where the file is located in a
user's directory. To make this difficult process easier for users, CIS
created a VMS command - USERPATH - that performs this "directory search"
automatically, saving time and effort for novice and experienced users
alike.
USERPATH -- The
USERPATH command creates a logical name that defines the default directory
path for a specified VMS user. In other words, it creates a shortcut to
direct VMS to the user's default directory.
There may be several public disk devices (e.g.,
WWWDISK:, STUDISK:, etc.) and many root directories, which can make it difficult
to remember the exact default directory path for a specific VMS user. The
USERPATH command determines the default directory for a specified username
and defines a logical name that can be used to refer to that directory.
In other words, the USERPATH command finds out where the directory and
file(s) are located among the public disk structures and allows you to
create a nickname that defines the path to that user's directory.
| Example: |
$ USERPATH GGA1 GLENN
<RETURN> |
| |
$ COPY glenn:samplefile.1
myfile.new |
| Result: |
A default directory path was defined for username
GGA1; the logical name that defines the default directory path is GLENN.
(In general, when creating a logical name, the shorter the name, the better.) |
| |
The COPY command was then used to copy a file
('samplefile.1') from username GGA1's directory to your directory, where
it has been renamed 'myfile.new'. |
Two helpful points to remember when using the USERPATH
command:
-
The userpath you have defined during your current session
remains defined until you log out of your session. Should you need to copy
another file, you would use the COPY command without invoking USERPATH
again.
-
You can add the USERPATH command defined for directories
you access frequently to your LOGIN.COM file. Thus, if you are working
on a group project, you can easily copy a file from your colleagues' directories.
(See the help sheet "How
To Create a LOGIN.COM File in VMS" for help creating or editing this
file.)
For more information on the COPY and USERPATH commands, type
HELP USERPATH or HELP COPY at the VMS system prompt.
<-- Back to the Top
Deleting
Files
DELETE -- Removes files
from your directory. When you use the DELETE command, you must specify
a file name, file type (extension) and version number. You can also enter
more than one file specification on a command line, separating the file
specifications with commas. To specify the version of a file, type a semi-colon
after the filename and indicate the version number. The higher a version
number, the more recent the file is.
| Example: |
$ DELETE newfile.dat; |
| Result: |
Deletes the latest (current) version of the
file 'newfile.dat'. |
| |
|
| Example: |
$ DELETE *.dat;* |
| Result: |
Deletes all files and all versions (including
the most recent version) of files of the '.dat' type. |
| |
|
| Example: |
$ DELETE
newfile.dat;1,newfile.dat;2 |
| Result: |
Deletes the first two versions of the same data
file. |
PURGE -- You may want
to clean up your VMS directory by getting rid of all early versions of
particular files. If you have many versions of a file saved, naming them
all in the DELETE command would be tedious. PURGE allows you to delete
all but the most recent version of a file; therefore, no version number
is required by the PURGE command.
| Example: |
$ PURGE |
| Result: |
Deletes all but the most recent version of all
files on your directory. |
| |
|
| Example: |
$ PURGE newfile.dat |
| Result: |
Deletes all files named 'newfile.dat' except
the file with the highest version number (the current version). |
For more information on the DELETE and PURGE commands,
type HELP DELETE or HELP PURGE at the VMS system prompt.
<-- Back to the Top
Renaming
Files
RENAME -- Changes the
identification (name) of one or more files in your directory.
| Example: |
$ RENAME oldfilename.dat
newfilename.dat |
| Result: |
Changes the name of the most recent version
of the file 'oldfilename.dat' to 'newfilename.dat'. |
For more information, type HELP RENAME at the
VMS system prompt.
<-- Back to the Top
Changing
File Protection
SET PROTECTION --
Changes the protection on your VMS files. Your files are protected by four
categories of protection: System, Owner, Group and
World. Each category can be permitted or denied access in four
different areas: Read permits others to read or copy;
Execute permits others to run your programs; Delete permits
the deletion of your files; Write allows your files to be
altered.
The default file protections permit the System and the
Owner to have Read, Write, Execute and Delete privileges; Group is permitted
Execute privileges; and World is permitted no access. Owners are permitted
Read, Write and Execute privileges on subdirectories they create.
The syntax of the SET PROTECTION command is:
$ SET PROTECTION=(S:xxxx,
O:xxxx, G:xxxx, W:xxxx) filename.dat
where xxxx represents the four
areas of protection:
| R |
Read permission |
W |
Write permission |
| |
|
|
|
| E |
Execute permission |
D |
Delete permission |
If you do not explicitly change a file/directory
protection category, it will remain at its original (or default)
level.
When a file or directory is created, the VMS system
automatically has all privileges (S:RWED), including Read and Execute
rights. Do not change the System protection on directories or make it
more restrictive than the default since certain utilities (such as
MAIL) may not perform correctly. You should also be aware that files
without appropriate system permissions will not be backed up as part of
routine back-up procedures.
| Example: |
$ SET PROTECTION=(O:RWED,
S:RWED, G:RW, W:R) newfile.dat |
| Result: |
Owner and System have all privileges, Group
has Read and Write privileges, and World has Read privileges only. |
| |
|
| Example: |
$ SET PROTECTION=(W:RE)
newfile.dat |
| Result: |
World has Read and Execute privileges only,
all other protections remain unchanged. |
For more information, type HELP SET PROTECTION
at the VMS system prompt.
<-- Back to the Top
Setting
and Changing Your Password
Every account has a password -- a word known only to you
that you must enter to access your account. DO NOT REVEAL YOUR PASSWORD
TO ANYONE. Your initial password, assigned by CIS, is usually a form
of your University of Pittsburgh ID number.
For your own security, you must change your password the
first time you log in to a new account. The system will prompt:
OLD PASSWORD:
NEW PASSWORD:
RETYPE NEW PASSWORD:
The system asks you to retype the new password for
verification. As you type your password, the characters will not be
displayed on the screen. This protects your account by prohibiting other
users from viewing your password.
Use the SET PASSWORD
command to change your password.
$ SET PASSWORD
You will get a message saying that you have been connected
to the Network Authorization Account Password Maintenance Program. This
is a centralized password server that CIS uses to keep track of passwords
for all computing services. In order to access this server, you will have
to enter your Network Authorization Account username again when the system
prompts "login:". You will then be required
to enter your current password and your new password twice. CIS recommends
that you use a password between five and eight characters in length that
uses upper case letters, lower case letters and numbers.
Trying ... connected to MAGENTA.CIS.PITT.EDU,
a DECSTATION-3100 running ULTRIX. Network Authorization Account Password
Maintenance Program
login: (enter your account
username here) <RETURN>
Old password: (enter your
old password) <RETURN>
New password (RETURN to abort):
(enter your new password) <RETURN>
Retype new password: (enter
your new password again) <RETURN>
Some Password Tips:
-
Do not choose a password that is easy for others to
guess.
-
Use a combination of alphabetic and numeric
characters.
-
Do not choose a password that is very short.
-
Do not reveal your password to anyone.
-
Never write your password down; it is safer to memorize
it.
-
When logging in, do not type ahead; wait until the system
prompts for your password before you enter it.
-
Change your password periodically.
For more information, type HELP SET PASSWORD at the
VMS $ prompt.
<-- Back to the Top
Printing
from VMS
The PRINT command prints
files from VMS. Use the '/QUEUE=queuename' qualifier to select a printer;
use the '/PARAMETER' or '/PARAM' qualifier to get output other than the
default.
| Example: |
$ PRINT sample.file |
| Result: |
Default output: printed on the printer at
the Becker Hall computing lab. |
| |
|
<-- Back to the Top