2015-03-27 12:22:48 -04:00
|
|
|
.Dd March 27, 2015
|
2015-01-31 08:20:02 -05:00
|
|
|
.Dt TOUCH 1
|
2015-01-31 14:37:03 -05:00
|
|
|
.Os sbase
|
2015-01-20 06:15:18 -05:00
|
|
|
.Sh NAME
|
|
|
|
.Nm touch
|
|
|
|
.Nd set file timestamps
|
|
|
|
.Sh SYNOPSIS
|
2015-01-30 15:17:58 -05:00
|
|
|
.Nm
|
2015-01-20 06:15:18 -05:00
|
|
|
.Op Fl acm
|
2015-02-19 12:54:56 -05:00
|
|
|
.Op Fl d Ar time | Fl r Ar ref_file | Fl T Ar time | Fl t Ar time
|
2015-01-20 06:15:18 -05:00
|
|
|
.Ar file ...
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
2015-02-19 12:54:56 -05:00
|
|
|
sets the access and modification time of each
|
2015-02-08 18:41:57 -05:00
|
|
|
.Ar file
|
|
|
|
to the current time of day. If
|
|
|
|
.Ar file
|
|
|
|
doesn't exist, it is created with default permissions.
|
2015-01-20 06:15:18 -05:00
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width Ds
|
2015-02-08 18:41:57 -05:00
|
|
|
.It Fl a | Fl m
|
|
|
|
Set the access | modification time of
|
|
|
|
.Ar file.
|
2015-01-20 06:15:18 -05:00
|
|
|
.It Fl c
|
2015-02-08 18:41:57 -05:00
|
|
|
Don't create
|
|
|
|
.Ar file
|
|
|
|
if it doesn't exist, not affecting exit status.
|
2015-02-19 12:54:56 -05:00
|
|
|
.It Fl d Ar time
|
|
|
|
Set the
|
|
|
|
.Ar time
|
|
|
|
of the format YYYY-MM-DDThh:mm:SS[Z] used for
|
|
|
|
.Op Fl am .
|
2015-02-08 18:41:57 -05:00
|
|
|
.It Fl r Ar ref_file
|
2015-02-19 12:54:56 -05:00
|
|
|
Set the
|
|
|
|
.Ar time
|
|
|
|
used for
|
2015-02-08 18:41:57 -05:00
|
|
|
.Op Fl am
|
|
|
|
to the modification time of
|
|
|
|
.Ar ref_file .
|
2015-02-19 12:54:56 -05:00
|
|
|
.It Fl T Ar time
|
2015-02-08 18:41:57 -05:00
|
|
|
Set the
|
2015-02-19 12:54:56 -05:00
|
|
|
.Ar time
|
|
|
|
used for
|
2015-02-08 18:41:57 -05:00
|
|
|
.Op Fl am
|
|
|
|
given as the number of seconds since the
|
|
|
|
Unix epoch 1970-01-01T00:00:00Z.
|
2015-02-19 12:54:56 -05:00
|
|
|
.It Fl t Ar time
|
|
|
|
Set the
|
|
|
|
.Ar time
|
|
|
|
of the format [[CC]YY]MMDDhhmm[.SS] used for
|
|
|
|
.Op Fl am .
|
2015-01-20 06:19:32 -05:00
|
|
|
.El
|
2015-01-20 06:15:18 -05:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr date 1
|
2015-02-08 18:41:57 -05:00
|
|
|
.Sh STANDARDS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is compliant with the
|
2015-03-27 12:22:48 -04:00
|
|
|
.St -p1003.1-2013
|
|
|
|
specification except from fractional seconds with
|
|
|
|
.Op Fl d .
|
2015-02-19 12:54:56 -05:00
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Op Fl T
|
2015-03-17 18:38:09 -04:00
|
|
|
flag is an extension to that specification.
|