NAME
|
changes – execute commands when files change |
SYNOPSIS
|
changes [ –ap ] [ –t time ] [ –c cmd ] [ –f file ] [ –c cmd ] [ file
... ] |
DESCRIPTION
|
Changes looks for files that changed since one day ago, or time
ago when –t is given. It looks at the modification times for all
the files given as arguments (recurring when they are directories).
For each file that changed it executes a command supplying the
file name as the last argument for the command. In general, the –c and –f options may be specified many times. Each –c sets cmd as the command to be used for following files mentioned in the command file. Initially, the command used is echo(1). That is, changes would simply print the names of the files (if they changed) mentioned before the first –c option. Commands may have multiple arguments, by quoting the entire command and its arguments as a single argument for changes. The time argument may be of the form Nd or Nh or Nm to look for changes since N days, hours, or minutes ago. Otherwise it is the number of seconds since the epoch to the time of interest. The flag –p makes changes prune (do not look inside) directories whose modification time has not changed (assuming that fossil(4) propagates the modification time up to the root directory when a file changes). This is only valid for the fossil used at Lsub, as of today.
By default, changes runs the given command only for files (not
for directories). Flag –a asks changes to consider directories
as well. |
EXAMPLES
Print the names of files changed during the last hour under /sys/src
and produce a long listing of files changed under $home :
|
SOURCE
|
/sys/src/cmd/changes.c |
BUGS
|
There is no way to detect that a file was removed. Flag –p works
only for the fossil(4) installed at Lsub. |