1
0
Files
irix-657m-src/eoe/man/man1/touch.1
2022-09-29 17:59:04 +03:00

166 lines
3.4 KiB
Groff

'\"macro stdmacro
.if n .pH g1.touch @(#)touch 41.7 of 5/26/91
.\" Copyright 1991 UNIX System Laboratories, Inc.
.\" Copyright 1989, 1990 AT&T
.nr X
.if \nX=0 .ds x} touch 1 "Directory and File Management Utilities" "\&"
.if \nX=1 .ds x} touch 1 "Directory and File Management Utilities"
.if \nX=2 .ds x} touch 1 "" "\&"
.if \nX=3 .ds x} touch "" "" "\&"
.TH \*(x}
.SH NAME
\f4touch\f1 \- update access and modification times of a file
.SH SYNOPSIS
\f4touch\f1
[
\f4\-amc\f1
] [ \f2mmddhhmm\f1[\f2yy\f1] ] \f2files\f1
.sp
\f4touch\f1
[
\f4\-amc\f1
] [ \f4\-r\f1 \f2ref_file\f1 |
\f4\-t\f1 [[\f2cc\f1]\f2yy\f1]\f2mmddhhmm\f1[.\f2ss\f1] ]
\f2files\f1
.SH DESCRIPTION
\f4touch\fP
causes the access and modification times of each
argument to be updated.
The file name is created if it does not exist.
If no time is specified [see \f4date\f1(1)]
the current time is used.
The
\f4\-a\f1
and
\f4\-m\f1
options cause touch to update only the access or modification
times respectively (default is
\f4\-am\f1).
The
\f4\-c\f1
option silently prevents
\f4touch\fP
from creating the file if it did not
previously exist.
The
\f4\-r\f1
option causes touch to use the modification time of the file named
by the pathname
\f2ref_file\f1
instead of of the current time.
.PP
The
\f4\-t\f1 [[\f2cc\f1]\f2yy\f1]\f2mmddhhmm\f1[.\f2ss\f1]
option specifies to the time to use instead of the current time. The
option-argument will be a decimal number where each two digits represents
the following:
.sp
.TP 10
.in +0.5i
.I mm
The month of the year [01-12].
.TP
.in +0.5i
.I dd
The day of the month [01-31].
.TP
.in +0.5i
.I hh
The hour of the day [00-23].
.TP
.in +0.5i
.I mm
The minute of the hour [00-59].
.TP
.in +0.5i
.I cc
The first two digits of the year (century).
.TP
.in +0.5i
.I yy
The second two digits of the year.
.TP
.in +0.5i
.I ss
The second of the minute [00-61].
.PP
.in +0.5i
Both
.I cc
and
.I yy
are optional. If neither is given, the current year will be assumed.
If
.I yy
is specified, but
.I cc
is not,
.I cc
will be derived as follows:
.sp
.in +0.5i
If
.I yy is:
.I 69-99
then
.I cc
becomes
.I 19.
.sp
If
.I yy is:
.I 00-68
then
.I cc
becomes
.I 20.
.PP
.in +0.5i
The range for
.I ss
is (00-61) rather than (00-59) because of leap seconds. If
.I ss
is 60 or 61, and the resulting time, as affected by the
.I TZ
environment variable, does not refer to a leap second, the resulting
time will be one or two seconds after a time where
.I ss
is 59. If
.I ss
is not given a value, it is assumed to be zero.
.PP
The return code from
\f4touch\fP
is the number of files for which the times could not
be successfully modified
(including files that did not exist and were not created).
.SH FILES
.TP
\f4/usr/lib/locale/\f2locale\f4/LC_MESSAGES/uxcore.abi\f1
language-specific message file [See \f4LANG\fP on \f4environ\f1 (5).]
.SH SEE ALSO
\f4date\fP(1),
\f4utime\fP(2)
.\" @(#)touch.1 6.2 of 9/2/83
.SH NOTES
.PP
Users familiar with the
BSD
environment will find that the
\f4\-f\f1
option is accepted, but ignored.
The
\f4\-f\f1
option is unnecessary since
\f4touch\f1
will succeed for all files owned by the user regardless of
the permissions on the files.
.P
If no \f4-r\f1 option is specified, no \f4-t\f1 option is specified,
at least two operands are specified,
and the first operand is an eight- or ten-digit decimal integer,
the first operand will be assumed to be a date-time specification
of the form mmddhhmm[yy].
Otherwise, the first operand will be assumed to be a file name.
.Ee