16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Options<br />

Examples<br />

–a Sets only the access time.<br />

–c Does not create any file that does not already exist. Normally, touch<br />

creates such files.<br />

–m Sets only the modification time.<br />

If you do not specify –a or –m, touch behaves as though you specified both.<br />

To tell touch to use a time other than the current, use one of the following options:<br />

–f agefile<br />

Is an obsolete version of the –r option.<br />

–r agefile<br />

Sets the access and modification times (as indicated by the other options)<br />

to those kept for agefile.<br />

–t time<br />

Specifies a particular time using this format:<br />

[[[[cc]yy]mm]dd]hhmm [.ss]<br />

where:<br />

v cc is the first two digits of the year (optional)<br />

v yy is the last two digits of the year (optional)<br />

v mm is the number of the month (01—12) (optional)<br />

v dd is the day of the month (optional)<br />

v hh is the hour in 24-hour format (required)<br />

v mm is the minutes (required)<br />

v ss is the seconds (optional)<br />

An obsolete (but still supported) version of this command lets you omit the<br />

–t, but the format is:<br />

[[mm]dd]hhmm[.ss]<br />

or:<br />

mmddhhmmyy[.ss]<br />

1. To set the modification time of newfile to the present, enter:<br />

touch newfile<br />

2. To set the modification time of oldfile to 13:05 on July 3, 1994, enter:<br />

touch –t 9407031305 oldfile<br />

3. To set the modification time of newfile to that of oldfile, enter:<br />

touch –r oldfile newfile<br />

Environment Variable<br />

touch uses the following environment variable:<br />

TZ Contains the time zone that touch is to use when interpreting times.<br />

See Appendix I for more information.<br />

touch<br />

Chapter 2. Shell command descriptions 701

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!