I'm using the "find" command to print out a listing of only those files
that have changed on my system in the last 24 hours, then tarring them up
and ftping them over to another machine for safekeeping. So far, the find
command syntax I use is this:
find . -mtime 1 -print > thefilelisting
All well and good. I then use the list of files as the input for the tar
command. Unfortunately, when you add a file to a directory, the timestamp
of the directory changes as well, and the find command will list that
directory on a line of its own, along with those files within it that meet
the criteria. This wouldn't be a problem, except that when tar is given a
subdirectory as input, it automatically recurses through that subdirectory,
and tars up all of the files in it, recent or not. Thus, whenever a file is
added to a directory, all of the files in it are tarred up, even if they
don't need to be. Does anyone know of an elegant way to tar up only those
files that have been modified in the last 24 hours? Thanks. I'm using
UnixWare 2.1, if that makes any difference.