![]() |
![]() |
![]() |
|
|
![]() |
When you include certain command qualifiers with the DIRECTORY command, you can retrieve information in addition to a list of the names of the files in the directory. Refer to the HP OpenVMS DCL Dictionary for a list of qualifiers that you can use with the DIRECTORY command.
The following examples illustrate three cases of retrieving information from the [MALCOLM] directory, which resides on a disk with the logical name DISK$DOCUMENT.
The DIRECTORY command in this example lists all file types of the AVERAGE file and the version number of each file. The command would also list all versions of these files; however, only one version of each file exists.$
DIRECTORY AVERAGE.*
Directory DISK$DOCUMENT:[MALCOLM]
AVERAGE.EXE;6
AVERAGE.FOR;6 AVERAGE.LIS;4 AVERAGE.OBJ;12
Total of 4 files.
The DIRECTORY command in this example displays all the file types of the AVERAGE file and the version number of each file. The /SIZE qualifier displays the size of each file in blocks used. The /DATE qualifier displays the creation date of the version of the file that is listed. The VERSIONS=1 qualifier limits the number of versions of the file displayed to one (the most recent) version. The /PROTECTION qualifier displays the file protection for each file.$
DIRECTORY/SIZE/DATE/VERSIONS=1/PROTECTION AVERAGE
Directory DISK$DOCUMENT:[MALCOLM]
AVERAGE.EXE;6 6 10-APR-2000 15:43 (RWED,RWED,RWED,RE)
AVERAGE.FOR;6 2 2-APR-2000 10:29 (RWED,RWED,RWED,RE)
AVERAGE.LIS;4 5 9-APR-2000 16:27 (RWED,RWED,RWED,RE)
AVERAGE.OBJ;6 2 9-APR-2000 16:27 (RWED,RWED,RWED,RE)
Total of 4 files, 15 blocks.
The DIRECTORY command in this example displays a full directory listing of one version of the AVERAGE.EXE file in the top-level directory [MALCOLM] and subdirectories under it.$
DIRECTORY/FULL/VERSIONS=1 [MALCOLM...]AVERAGE.EXE
Directory DISK$DOCUMENT:[MALCOLM]
AVERAGE.EXE;6 File ID: (4098,149,0)
Size: 36/36 Owner: [DOCUMENTATION,MALCOLM]
Created: 27-MAY-2000 12:22:26.30
Revised: 27-MAY-2000 12:22:51.35 (2)
Expires: <None specified>
Backup: 3-JUN-2000 22:03.09
Effective: <None specified>
Recording: <None specified>
File organization: Sequential
Shelved state: Online
File attributes: Allocation: 36, Extend: 36, Global buffer count: 0
No version limit
Record format: Variable length, maximum 255 bytes
Record attributes: Carriage return carriage control
Journaling enabled: None
File protection: System:RWED, Owner:RWED, Group:RE, World:
Access Cntrl List: None
Total of 1 file, 36/36 blocks.
Directory DISK$DOCUMENT:[MALCOLM.TEST]
AVERAGE.EXE;1 File ID: (7714,29,0)
Size: 36/36 Owner: [DOCUMENTATION,MALCOLM]
Created: 15-APR-2000 10:12
Revised: 15-APR-2000 10:12 (1)
Expires: <None specified>
Backup: 15-APR-2000 22:41
Effective: <None specified>
Recording: <None specified>
File organization: Sequential
Shelved state: Shelved
File attributes: Allocation: 36, Extend: 36, Global buffer count: 0
No version limit
Record format: Variable length, maximum 255 bytes
Record attributes: Carriage return carriage control
Journaling Enabled : None
File protection: System:RWED, Owner:RWED, Group:RE, World:
Access Cntrl List: None
Total of 1 file, 36/36 blocks.
Grand total of 2 directories, 2 files, 72/72 blocks.
Displaying Access Dates
To
support POSIX-compliant file timestamps on ODS-5 disks, OpenVMS
Alpha Version 7.3-1 includes three new file attributes:
st_atime
--reflects the last
time a file was accessed.st_ctime
--reflects
the last time a file attribute was modified.st_mtime
--reflects
the last time data was modified.Modifications to the file header are recorded as ATTDATE, unless the file is actually accessed. The REVDATE ACP-QIO attribute is the most recent of the MODDATE and ATTDATE timestamps. A new ACP-QIO attribute returns the stored REVDATE.
When a file is closed, if "norecord" is set, ACCDATE and REVDATE are not altered. Otherwise, if data has been read from the file, closing a file updates the file's access date. If data has been written to the file, closing a file updates the file's modification date.
Because access dates must be written out to disk, there is a performance impact when these new file attributes are used. The system manager can use the following command to enable or disable access date support and the frequency for changing access dates:
To limit the performance impact if a file is accessed frequently, update of the access time may be suppressed if the change is small. A delta time is used to determine when a new access time is significant.$
SET VOLUME/VOLUME_CHARACTERISTICS=
([[NO]]HARDLINKS,][[NO[ACCESS_DATES[=$deltatime]]
)
The next section contains an example that shows how to set access dates using the SET VOLUME/VOLUME_CHARACTERISTICS command.
DCL Access Dates
Use the SET VOLUME/VOLUME_CHARACTERISTICS
command to enable automatic update of access dates.
The default value for deltatime is 1 second, chosen to comply with the "seconds since EPOCH" time interface required by POSIX$
SET VOLUME/VOLUME_CHARACTERISTICS=ACCESS_DATES=[deltatime] NODE$COE1
st_atime
.
A site may choose a larger delta time to reduce overhead if 1 second granularity
is not required. You can also use the INITIALIZE/VOLUME_CHARACTERISTICS=ACCESS_DATES command to enable automatic update of access dates. Issue the following commands:
Use the SET VOLUME/VOLUME_CHARACTERISTICS=NOACCESS_DATES command to disable access date support on a volume. The SET VOLUME/VOLUME_CHARACTERISTICS=NOACESS_DATES command effects only the node where the command is issued. Other nodes are not effected by the change until the next time the volume is mounted.$
INITIALIZE/VOLUME_CHARACTERISTICS=ACCESS_DATES NODE$COE1
$
MOUNT NODE$COE1
Viewing Dates
The DCL commands DIRECTORY and DUMP/HEADER support the new
timestamps. Use the DIRECTORY/DATE command to see the new timestamps:
The /DATE=ACCESSED qualifier specifies the last access data --- the last time data was read from the file. Two other qualifiers also provide information on the new timestamps. Use the /DATE=ATTRIBUTES qualifier to specify the last attribute modification date. Use the /DATE=DATA_MODIFIED qualifier to specify the last data modification date.$
DIRECTORY/DATE=ACCESSED
|
|