2015-02-19 17:54:56 +00:00
|
|
|
.Dd February 9, 2015
|
2015-01-31 13:20:02 +00:00
|
|
|
.Dt TOUCH 1
|
2015-01-31 19:37:03 +00:00
|
|
|
.Os sbase
|
2015-01-20 11:15:18 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm touch
|
|
|
|
.Nd set file timestamps
|
|
|
|
.Sh SYNOPSIS
|
2015-01-30 20:17:58 +00:00
|
|
|
.Nm
|
2015-01-20 11:15:18 +00:00
|
|
|
.Op Fl acm
|
2015-02-19 17:54:56 +00:00
|
|
|
.Op Fl d Ar time | Fl r Ar ref_file | Fl T Ar time | Fl t Ar time
|
2015-01-20 11:15:18 +00:00
|
|
|
.Ar file ...
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
2015-02-19 17:54:56 +00:00
|
|
|
sets the access and modification time of each
|
2015-02-08 23:41:57 +00:00
|
|
|
.Ar file
|
|
|
|
to the current time of day. If
|
|
|
|
.Ar file
|
|
|
|
doesn't exist, it is created with default permissions.
|
2015-01-20 11:15:18 +00:00
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width Ds
|
2015-02-08 23:41:57 +00:00
|
|
|
.It Fl a | Fl m
|
|
|
|
Set the access | modification time of
|
|
|
|
.Ar file.
|
2015-01-20 11:15:18 +00:00
|
|
|
.It Fl c
|
2015-02-08 23:41:57 +00:00
|
|
|
Don't create
|
|
|
|
.Ar file
|
|
|
|
if it doesn't exist, not affecting exit status.
|
2015-02-19 17:54:56 +00: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 23:41:57 +00:00
|
|
|
.It Fl r Ar ref_file
|
2015-02-19 17:54:56 +00:00
|
|
|
Set the
|
|
|
|
.Ar time
|
|
|
|
used for
|
2015-02-08 23:41:57 +00:00
|
|
|
.Op Fl am
|
|
|
|
to the modification time of
|
|
|
|
.Ar ref_file .
|
2015-02-19 17:54:56 +00:00
|
|
|
.It Fl T Ar time
|
2015-02-08 23:41:57 +00:00
|
|
|
Set the
|
2015-02-19 17:54:56 +00:00
|
|
|
.Ar time
|
|
|
|
used for
|
2015-02-08 23:41:57 +00:00
|
|
|
.Op Fl am
|
|
|
|
given as the number of seconds since the
|
|
|
|
Unix epoch 1970-01-01T00:00:00Z.
|
2015-02-19 17:54:56 +00: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 11:19:32 +00:00
|
|
|
.El
|
2015-01-20 11:15:18 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr date 1
|
2015-02-08 23:41:57 +00:00
|
|
|
.Sh STANDARDS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is compliant with the
|
|
|
|
.St -p1003.1-2008
|
2015-02-19 17:54:56 +00:00
|
|
|
specification, except from fractional seconds in the
|
|
|
|
.Op Fl d
|
|
|
|
argument.
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Op Fl T
|
2015-03-17 22:38:09 +00:00
|
|
|
flag is an extension to that specification.
|