Hamilton LaboratoriesHamilton C shell 2012User guideExternal utilities


Oregon Coast

Previous | Next

        Create File or Set Modification Time

Usage:  touch [-rfc2wh-] [ mmddhhmm[ss][[yy]yy]] ] pathname1 [ pathname2 ... ]

   touch sets the timestamp on a file to the current or specified
   date and time.  If the file doesn't exist, the normal action is
   to create it.


  mmddhhmmssyyyy  Month, Day, Hour, Minutes, Seconds and Year in
                  decimal.  (If the century isn't specified, 81 to
                  99 is interpreted as 1981 to 1999; 00 to 80 is
                  interpreted as as 2000 to 2080.)  If only 10
                  digits are specified, touch interprets the last
                  two digits as seconds if they're less than 60;
                  otherwise, it interprets them as the year.

  -r    Recursively touch contents of directories.
  -f    Force Read-only files to be touched also.
  -c    File is not created if it doesn't already exist.
  -2    Two second granularity for compatibility with FAT and
        HPFS filesystems.
  -w    Give a warning message but continue trying to touch any
        remaining files or directories even if problems were
        encountered with some of them.
  -h    Help.
  --    End of options.

Previous | Next