version 1.23, 2011/08/28 22:54:05 |
version 1.24, 2011/08/31 08:48:40 |
|
|
.Nm touch |
.Nm touch |
.Op Fl acm |
.Op Fl acm |
.Sm off |
.Sm off |
.Op Fl "d " Ar YYYY No - Ar MM No - Ar DDThh : Ar mm : Ar SS Oo \&. Ar frac Oc Op Ar Z |
.Op Fl "d " Ar ccyy No - Ar mm No - Ar ddTHH : Ar MM : Ar SS Oo \&. Ar frac Oc Op Ar Z |
.Sm on |
.Sm on |
.Op Fl r Ar file |
.Op Fl r Ar file |
.Op Fl t Oo Ns Oo Ar CC Oc Ns Ar YY Oc Ns Ar MMDDhhmm Ns Op \&. Ns Ar SS |
.Op Fl t Oo Ns Oo Ar cc Oc Ns Ar yy Oc Ns Ar mmddHHMM Ns Op \&. Ns Ar SS |
.Ar |
.Ar |
.Sh DESCRIPTION |
.Sh DESCRIPTION |
The |
The |
|
|
utility does not treat this as an error. |
utility does not treat this as an error. |
No error messages are displayed and the exit value is not affected. |
No error messages are displayed and the exit value is not affected. |
.Sm off |
.Sm off |
.It Fl "d " Ar YYYY No - Ar MM No - Ar DDThh : Ar mm : Ar SS Oo \&. Ar frac Oc Op Ar Z |
.It Fl "d " Ar ccyy No - Ar mm No - Ar ddTHH : Ar MM : Ar SS Oo \&. Ar frac Oc Op Ar Z |
.Sm on |
.Sm on |
Change the access and modification times to the specified time. |
Change the access and modification times to the specified time. |
The argument should be of the form |
The argument should be of the form |
YYYY-MM-DDThh:mm:SS[.frac][Z], |
ccyy-mm-ddTHH:MM:SS[.frac][Z], |
where the parts of the argument represent the following: |
where the parts of the argument represent the following: |
.Pp |
.Pp |
.Bl -tag -width .frac -compact -offset indent |
.Bl -tag -width .frac -compact -offset indent |
.It Ar YYYY |
.It Ar ccyy |
The four digits of the year. |
Year. |
.It Ar MM |
.It Ar mm |
The month of the year, from 1 to 12. |
Month: |
.It Ar DD |
a number from 1 to 12. |
The day of the month, from 1 to 31. |
.It Ar dd |
|
Day: |
|
a number from 1 to 31. |
.It Ar T |
.It Ar T |
Either the capital letter |
Either the capital letter |
.Sq T |
.Sq T |
or a single space. |
or a single space. |
.It Ar hh |
.It Ar HH |
The hour of the day, from 0 to 23. |
Hour: |
.It Ar mm |
a number from 0 to 23. |
The minute of the hour, from 0 to 59. |
.It Ar MM |
|
Minute: |
|
a number from 0 to 59. |
.It Ar SS |
.It Ar SS |
The second of the minute, from 0 to 60. |
Second: |
.It No \&. Ns Ar frac |
a number from 0 to 60 |
|
(permitting a leap second). |
|
.It Ar frac |
The decimal fraction of the second, |
The decimal fraction of the second, |
either a period or comma, |
either a period or comma, |
followed by one or more decimal digits. |
followed by one or more decimal digits. |
|
|
.It Fl r Ar file |
.It Fl r Ar file |
Use the access and modification times from the specified file |
Use the access and modification times from the specified file |
instead of the current time of day. |
instead of the current time of day. |
.It Fl t Oo Ns Oo Ar CC Oc Ns Ar YY Oc Ns Ar MMDDhhmm Ns Op \&. Ns Ar SS |
.It Fl t Oo Ns Oo Ar cc Oc Ns Ar yy Oc Ns Ar mmddHHMM Ns Op \&. Ns Ar SS |
Change the access and modification times to the specified time. |
Change the access and modification times to the specified time. |
The argument should be of the form |
The argument should be of the form |
[[CC]YY]MMDDhhmm[.SS], |
[[cc]yy]mmddHHMM[.SS], |
where the parts of the argument represent the following: |
where the parts of the argument represent the following: |
.Pp |
.Pp |
.Bl -tag -width Ds -compact -offset indent |
.Bl -tag -width Ds -compact -offset indent |
.It Ar CC |
.It Ar ccyy |
The first two digits of the year (the century). |
Year. |
.It Ar YY |
If yy is specified, but cc is not, |
The second two digits of the year. |
a value for yy between 69 and 99 results in a cc value of 19. |
If |
Otherwise, a cc value of 20 is used. |
.Dq YY |
|
is specified, but |
|
.Dq CC |
|
is not, a value for |
|
.Dq YY |
|
between 69 and 99 results in a |
|
.Dq CC |
|
value of 19. |
|
Otherwise, a |
|
.Dq CC |
|
value of 20 is used. |
|
.It Ar MM |
|
The month of the year, from 1 to 12. |
|
.It Ar DD |
|
The day of the month, from 1 to 31. |
|
.It Ar hh |
|
The hour of the day, from 0 to 23. |
|
.It Ar mm |
.It Ar mm |
The minute of the hour, from 0 to 59. |
Month: |
.It No \&. Ns Ar SS |
a number from 1 to 12. |
The second of the minute, from 0 to 60, |
.It Ar dd |
|
Day: |
|
a number from 1 to 31. |
|
.It Ar HH |
|
Hour: |
|
a number from 0 to 23. |
|
.It Ar MM |
|
Minute: |
|
a number from 0 to 59. |
|
.It Ar SS |
|
Second: |
|
a number from 0 to 60 |
|
(permitting a leap second), |
preceded by a period. |
preceded by a period. |
|
The default is 0. |
.El |
.El |
.Pp |
|
If the |
|
.Dq CC |
|
and |
|
.Dq YY |
|
letter pairs are not specified, the values default to the current |
|
year. |
|
If the |
|
.Dq SS |
|
letter pair is not specified, the value defaults to 0. |
|
.El |
.El |
.Sh EXIT STATUS |
.Sh EXIT STATUS |
.Ex -std touch |
.Ex -std touch |
|
|
option is specified, there are at least two arguments, and the first |
option is specified, there are at least two arguments, and the first |
argument is a string of digits either eight or ten characters in length, |
argument is a string of digits either eight or ten characters in length, |
the first argument is interpreted as a time specification of the form |
the first argument is interpreted as a time specification of the form |
.Dq MMDDhhmm[YY] . |
.Dq mmddHHMM[yy] . |
.Sh HISTORY |
.Sh HISTORY |
A |
A |
.Nm |
.Nm |