sbase

suckless unix tools
git clone git://git.suckless.org/sbase
Log | Files | Refs | README | LICENSE

touch.1 (1166B)


      1 .Dd October 8, 2015
      2 .Dt TOUCH 1
      3 .Os sbase
      4 .Sh NAME
      5 .Nm touch
      6 .Nd set file timestamps
      7 .Sh SYNOPSIS
      8 .Nm
      9 .Op Fl acm
     10 .Op Fl d Ar time | Fl r Ar ref_file | Fl T Ar time | Fl t Ar time
     11 .Ar file ...
     12 .Sh DESCRIPTION
     13 .Nm
     14 sets the access and modification time of each
     15 .Ar file
     16 to the current time of day.
     17 If
     18 .Ar file
     19 doesn't exist, it is created with default permissions.
     20 .Sh OPTIONS
     21 .Bl -tag -width Ds
     22 .It Fl a | Fl m
     23 Set the access | modification time of
     24 .Ar file.
     25 .It Fl c
     26 Don't create
     27 .Ar file
     28 if it doesn't exist, not affecting exit status.
     29 .It Fl d Ar time
     30 Set the
     31 .Ar time
     32 of the format YYYY-MM-DDThh:mm:SS[Z] used for
     33 .Op Fl am .
     34 .It Fl r Ar ref_file
     35 Set the
     36 .Ar time
     37 used for
     38 .Op Fl am
     39 to the modification time of
     40 .Ar ref_file .
     41 .It Fl T Ar time
     42 Set the
     43 .Ar time
     44 used for
     45 .Op Fl am
     46 given as the number of seconds since the
     47 Unix epoch 1970-01-01T00:00:00Z.
     48 .It Fl t Ar time
     49 Set the
     50 .Ar time
     51 of the format [[CC]YY]MMDDhhmm[.SS] used for
     52 .Op Fl am .
     53 .El
     54 .Sh SEE ALSO
     55 .Xr date 1
     56 .Sh STANDARDS
     57 The
     58 .Nm
     59 utility is compliant with the
     60 .St -p1003.1-2013
     61 specification except from fractional seconds with
     62 .Op Fl d .
     63 .Pp
     64 The
     65 .Op Fl T
     66 flag is an extension to that specification.