Document revision date: 19 July 1999 | |
Previous | Contents | Index |
Use the asterisk (*) wildcard character to match the following:
You can use the asterisk (*) wildcard character as follows:
$ PRINT [FROGMAN]*.*;* |
$ TYPE *.DAT;* |
$ DIRECTORY [FROGMAN.*]*.DAT |
$ TYPE [*.*.*]AVERAGE.*;* |
Use the percent sign (%) wildcard character as a substitute for any single character in a file specification. You can use the percent sign in the directory, file name, and file type fields. You cannot, however, use the percent sign in the version number field or in ANSI magnetic tape file specifications. The percent sign replaces one character position in a field, but there must be a character to replace.
You can specify the percent sign as many times as necessary and in combination with other wildcard characters.
The following example displays the latest versions of all .DAT files whose names are DISTRICT followed by a single character:
$ TYPE [JONES.TAXES.PROPERTY]DISTRICT%.DAT |
This display would include the files DISTRICT1.DAT, DISTRICT2.DAT, and DISTRICT3.DAT. The file DISTRICT4_5.DAT would not be displayed because it has more than one character after DISTRICT, nor would the file DISTRICT.DAT be displayed.
The file specification in this example is valid:
$ [MA*]INS%%%A*.J*;* |
The following sections describe other types of file names supported in
an OpenVMS environment.
4.3.1 Null File Names and File Types
The file name and file type fields can be null. For example, the following are valid file specifications:
.TMP | (file name is null) |
TEMP. | (file type is null) |
Because the FORTRAN command uses the default file type .FOR, the commands in this example produce different results:
$ FORTRAN TEMP $ FORTRAN TEMP. |
In the first example, the FORTRAN compiler looks for a file named
TEMP.FOR because the file type is omitted. In the second example, the
compiler looks for a file named TEMP. because a period following the
file name indicates a null file type.
4.3.2 Alternate File Names for Magnetic Tapes
In addition to standard file names, the operating system supports an alternate file-naming convention for ANSI-labeled magnetic tapes. The format is as follows:
"filename".;version |
The file name can contain 1 to 17 characters from the ASCII "a" character set. This set of characters includes numeric characters, uppercase letters, and a space, as well as the following characters:
! " % ' ( ) * + , - . / : ; < => ? & _ |
In addition, asterisk (*) wildcards are allowed in ANSI file names.
4.4 Creating and Modifying Files
The following sections describe how to create and modify files with tools and commands supported in an OpenVMS environment.
The most versatile interactive tool for creating and modifying text files is the interactive text editor. EVE and EDT are two text editors that are included in the OpenVMS operating system; other text editors may also be available on your system.
You can also create and modify files by using the DCL commands CREATE, COPY, and RENAME. The following sections describe how to create and modify files using these commands.
If you are working in an environment with Extended File Specifications,
refer to the OpenVMS Guide to Extended File Specifications for further information about creating and
copying files in your environment.
4.4.1 Creating Files
The CREATE command creates a text file. You cannot modify a file with the CREATE command; after you have pressed Return, you cannot return to a previous line to modify a word. You must use a text editor such as EDT or EVE to modify a file created with the CREATE command. Pressing Ctrl/Z signals the end of the file and returns you to DCL command level.
In the following example, a file named POUND.LIS is created by entering the CREATE command and then typing lines of text:
$ CREATE POUND.LIS Tag #23, Elmer Doolittle, notified Tag #37, James Watson, notified No tag, light brown, 30 lbs., looks part beagle [Ctrl/Z] |
You can use the COPY command to duplicate:
$ COPY FEES.DAT RECORDS.DAT |
$ COPY *.TXT;* [SAVETEXT]*.*;* |
$ COPY/SINCE=11-DEC-1996/MODIFIED [JONES.LICENSES.DOG]*.* * |
The COPY command can also be used to concatenate files. For example, to append FEES1.DAT to FEES.DAT (forming a new version of FEES.DAT) in your default directory, enter the following command:
$ COPY FEES.DAT,FEES1.DAT FEES.DAT |
Note that there is no space between the comma after FEES.DAT and the
file name FEES1.DAT.
4.4.4 Copying Files from a Remote Node to Your Node
Use the COPY command to copy files from another node to your node. For example, to copy the latest version of all files in DISK2:[PUBLIC] on node CHAOS to files with the same names in your default directory, enter the following command:
$ COPY CHAOS::DISK2:[PUBLIC]*.* * |
Use the COPY command to copy files from your node to another node. If you receive a protection violation or DECnet error message when you attempt to copy a file across systems, you can either use mail to copy the file or you can use an access control string.
In the following example, the latest version of all files in the default directory are copied to files with the same names in the directory DISK2:[STAFF_BACKUP] on node CHAOS:
$ COPY *.* CHAOS::DISK2:[STAFF_BACKUP] |
When copying to and from remote nodes in a cluster of mixed environments (nodes with Extended File Specifications and nodes without Extended File Specifications), be aware that extended file names and special characters may not copy as expected. Refer to the OpenVMS Guide to Extended File Specifications for more information. |
If the file is yours, you can use Mail to send it to a user account on the other node.
When sending files though mail, note the following restrictions:
For more information on using Mail to send files, see Chapter 6.
In the following example, the file FEES.DAT is sent to the JONES account on node CHAOS:
$ MAIL/SUBJECT="Fee schedule" FEES.DAT CHAOS::JONES |
To copy files after you have received a protection violation, you can follow the node name in the file specification with an access control string (see Section 4.1.10).
In the following example, the user has an account on node CHAOS with the user name SMITH and the password SPG96PRT. The user is copying all of the files in the default directory to the account on CHAOS.
$ COPY *.* CHAOS"SMITH SPG96PRT"::DISK2:[STAFF_BACKUP] |
Use the RENAME command to give the file a new name and optionally to locate it in a different directory. Note that after being renamed, the original file no longer exists. When you use the RENAME command, the input and output locations must be on the same device.
In the following example, the file FEES.DAT is given the new name RECORDS.DAT and it is moved from the default directory to the [SAVETEXT] directory:
$ RENAME FEES.DAT;4 [SAVETEXT]RECORDS.DAT |
The following sections describe how to display the contents of files
with tools and commands supported in an OpenVMS environment.
4.5.1 Using the TYPE Command
To display the contents of a file on your screen, enter the TYPE command and the file name at the DCL prompt. You do not have to specify the version number in the file specification because the system displays the latest version of a file by default.
In the following example, the latest version of the file STAFF_VACATIONS.TXT is displayed:
$ TYPE STAFF_VACATIONS.TXT |
To stop the scrolling of the text on the screen temporarily, press the Hold Screen key (F1 on VT200 and VT300 series terminals); to resume scrolling, press the Hold Screen key again. To stop the display and return to DCL command level, press Ctrl/Y or Ctrl/O.
If you specify the /PAGE qualifier to the TYPE command, you can view one screen at a time. The system prompts you to press Return when you want to see the next screen.
To display the contents of a file on a remote node, include the node name, disk, and directory in the file specification.
In the following example, the file COMPANY_HOLIDAYS.TXT (which is located on remote node CHAOS) is displayed:
$ TYPE CHAOS::DISK2:[PUBLIC]COMPANY_HOLIDAYS.TXT |
You can use the asterisk (*) wildcard to display all versions of a specific file.
In the following example, all versions of the file LOGIN.COM in the directory [JONES] are displayed:
$ TYPE [JONES]LOGIN.COM;* |
In the following example, all versions and all file types of all files that begin with the word STAFF in the directory [JONES] are displayed:
$ TYPE [JONES]STAFF*.*;* |
If you specify more than one file in the TYPE command line, the system
displays the files in the order you specify. If you use wildcard
characters, the system displays the files in alphabetical order.
4.6 Deleting Files
The DELETE command removes files from directories and releases the disk space they occupy for use by other files. When you use the DELETE command, you must specify a version number or the asterisk (*) wildcard character as a version number in each file specification.
For example, to delete version 17 of the file POUND.LIS, enter the following command:
$ DELETE POUND.LIS;17 |
To delete versions 16 and 17 of the file POUND.LIS, enter the following command:
$ DELETE POUND.LIS;16,;17 |
To delete all versions of the file POUND.LIS, enter the following command:
$ DELETE POUND.LIS;* |
When you delete many files with wildcard characters, you might want to confirm each deletion by using the /CONFIRM qualifier. Similarly, you might want to display the names of files as they are deleted. To do this, specify the /LOG qualifier with the DELETE command.
In the following example, the deletion of all the files in the subdirectory [JONES.LICENSES.DOG] is confirmed because the /CONFIRM qualifier is specified:
$ DELETE/CONFIRM *.*;* DISK1:[JONES.LICENSES.DOG]FEES.DAT;4, delete? [N]: Y DISK1:[JONES.LICENSES.DOG]FEMALE.LIS;6, delete? [N]: Y DISK1:[JONES.LICENSES.DOG]MALE.LIS;3, delete? [N]: N DISK1:[JONES.LICENSES.DOG]POUND.LIS;17, delete? [N]: Y |
In the following example, the system displays the names of the files after they are deleted because the /LOG qualifier is specified:
$ DELETE/LOG *.LIS;* _%DELETE-I-FILDEL, DISK1:[JONES.LICENSES.DOG]FEMALE.LIS;6 deleted (35 blocks) _%DELETE-I-FILDEL, DISK1:[JONES.LICENSES.DOG]MALE.LIS;3 deleted (5 blocks) _%DELETE-I-FILDEL, DISK1:[JONES.LICENSES.DOG]POUND.LIS;17 deleted (9 blocks) |
The PURGE command deletes all except the latest version of the specified file (or all files) in the default directory or any other specified directory. Purging old versions of files after updating them enables you to retain more free space on your disk.
In the following example, all except the latest two versions of each file in the default directory are purged:
$ PURGE/KEEP=2 |
The following sections provide an overview of file protection procedures. For detailed security information, see the following:
To prevent other users from accessing your files, you can change the
protection or modify the access control list (ACL) of your files. To
change the protection or modify the ACL of a file, you must own the
file, have control access to the file, or have GRPPRV, SYSPRV, BYPASS,
or READALL privilege.
4.7.2 Types of Protection
There are two types of file protection: default and explicit. When a file is created, it usually has the same protections as its parent directory; this is the default protection. If you create a file using the CREATE/PROTECTION command or if you change the protection on an existing file by issuing the SET SECURITY/PROTECTION command, you are using explicit file protection.
Note that to protect a file completely, you must apply the same or
greater protection to the directory in which the file resides.
4.8 Printing Files
To print a file or files, use the PRINT command. The PRINT command places your print job (all the files to be printed) in a list of jobs to be printed called a print queue. The file types of the files named in the PRINT command default to .LIS or the last explicitly named file type. The system displays the job name, the queue name, the job number, and status of the job.
By default, the job name is the name of the first (or only) file specification in the PRINT command. After a job is submitted to a queue, you reference it using the job number. After the job is queued, it will be printed when no other jobs precede it in the queue and when the printer is physically ready to print.
In the following example, a print job containing three files is placed in the default print queue, SYS$PRINT:
$ PRINT POUND,MALE,FEES.DAT Job POUND (queue SYS$PRINT, entry 202) started on SYS$PRINT |
Because the default file type for the PRINT command is .LIS, the files
POUND.LIS, MALE.LIS, and FEES.DAT are queued. The job name is POUND,
the queue name is SYS$PRINT, and the job number is 202.
4.8.1 Print Job Priority
A print queue can execute only one job at a time. Print jobs are
scheduled for printing according to their scheduling
priority, and the job with the highest priority is
printed first. If more than one job exists with the same priority, the
smallest job is usually printed first. Jobs of equal size having the
same priority are selected for printing according to their submission
time. Priority may also be determined by the system manger or by
entering the /PRIORITY qualifier to the PRINT command. For more
information on scheduling priorities, see the OpenVMS System Manager's Manual.
4.8.2 Displaying Queue Information
The default print queue, SYS$PRINT, is usually started as part of the site-specific system startup procedure. The following table shows commands you can use to display information about queues:
To display... | Enter this command... |
---|---|
The queues at your site | SHOW QUEUE |
The status of your print jobs | SHOW ENTRY |
Jobs queued by other users | SHOW ENTRY/USERNAME= username |
Information about a specific job or jobs |
SHOW ENTRY
job-name
SHOW ENTRY entry-number |
In the following example, the SHOW ENTRY command is used to display information about a print job that has been queued:
$ SHOW ENTRY Entry Jobname Username Blocks Status ----- ------- -------- ------ ------ 202 POUND JONES 38 Pending On stopped printer queue SYS$PRINT) |
Previous | Next | Contents | Index |
privacy and legal statement | ||
6489PRO_008.HTML |