update the timestamp of a file


accurev touch [ -R ] [ -t <time-spec> ] <file-list>


The touch command updates the time-last-modified timestamp on one or more files in your workspace. To set the timestamps, it uses the system clock on your host (the client computer) or the time you specify with -t.

Note: touch does not affect the depot at all, just the specified file(s) in your workspace.

Typically, you should use touch on files that you copy into the workspace from another location — your home directory, a remote FTP site, etc. Some applications update the timestamps on the files they copy; others don’t.



For each directory in <file-list>, process all the files in its subdirectory tree.

-t <time-spec>

A time-spec can be:

  • Time in <"YYYY/MM/DD HH:MM:SS"> format, "2007/08/07 20:27:15", for example. Note that you must use quotes when specifying time-spec as YYYY/MM/DD HH:MM:SS to ensure that the entire argument is interpreted by the command shell as a single token.
  • Time keyword: now

When using the –t option, take into account the possibility of a timewarp. The AC_SYNC environment variable (see AccuRev User Preferences) determines how a timewarp will be handled. See also System Clock Synchronization in the AccuRev Admin Guide.


Update the timestamps of two files:

> accurev touch test/ doc/rebase.doc

Update the timestamps of all files in two subdirectories:

> accurev touch -R src lib

See Also

add , keep, stat

Techniques for Selecting Elements