2015-02-08 23:41:57 +00:00
|
|
|
.Dd February 9, 2014
|
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-08 23:41:57 +00:00
|
|
|
.Op Fl r Ar ref_file | t Ar timestamp
|
2015-01-20 11:15:18 +00:00
|
|
|
.Ar file ...
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
2015-02-08 23:41:57 +00:00
|
|
|
sets the access or modification time of each
|
|
|
|
.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.
|
|
|
|
.It Fl r Ar ref_file
|
|
|
|
Set the timestamp
|
|
|
|
to be used with
|
|
|
|
.Op Fl am
|
|
|
|
to the modification time of
|
|
|
|
.Ar ref_file .
|
|
|
|
.It Fl t Ar timestamp
|
|
|
|
Set the
|
|
|
|
.Ar timestamp
|
|
|
|
to be used with
|
|
|
|
.Op Fl am
|
|
|
|
given as the number of seconds since the
|
|
|
|
Unix epoch 1970-01-01T00:00:00Z.
|
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
|
|
|
|
specification except from the
|
|
|
|
.Ar timestamp
|
|
|
|
format of the
|
|
|
|
.Fl t
|
|
|
|
flag.
|