gtpo1m6bOperations

ZFILE touch-Change the Time Stamp of a File

Use this command to change the time stamp of a file or to create a zero-length (empty) file.

Requirements and Restrictions

Format




-a
changes the access time, which is the time when the file was last accessed with a read or write operation.

-m
changes the modification time, which is the time when the file was last accessed with a write operation.

-c
indicates that you do not want to create a file if the file does not exist.

-rreffile
specifies a file whose corresponding time is to be used instead of the current time, where reffile is the file name.

-ttime
specifies the time to use instead of the current time. Specify time in the format CCYYMMDDhhmm.SS, where:

CC
is the first 2 digits of the year (that is, the century). This is optional.

YY
is the last 2 digits of the year. This is optional.

MMDDhhmm
is the month, day, hour, and minutes. You must specify this portion of the time.

SS
is the seconds. This is optional.

path
is the path name of the file whose time stamp you want to change. If the file does not exist, a new zero-length file is created.

Additional Information

Examples

In the following example, the access and modification time stamps are changed.

+---------------------------------------------------------------------------------------------+
|User:   ZFILE touch test.file                                                                |
|                                                                                             |
|System: FILE0003I 15:31:22 touch test.... COMPLETED SUCCESSFULLY. NO OUTPUT TO DISPLAY       |
+---------------------------------------------------------------------------------------------+

Related Information

See Information Technology--Portable Operating System Interface for Computer Environments (POSIX) for more information about the POSIX standards.