at a high level, if there's been a modification to a file in a directory the mtime of the directory should reflect the modification. this does not propagate to parents, it's simply a reflection of the metadata for the container directory. as such you should be able to check the mtime of only directories within a hierarchy. this would eliminate the need to check the mtime of all of the files within a directory. rsync doen't cut it? On Jan 9, 2008 4:29 PM, Wayne Johnson <wdtj at yahoo.com> wrote: > > Anyone know of a quick and easy way to find the date of the newest file in a > directory tree. > > I'm looking for a way to speed up synchronizing file caches between > machines. When you have 1m in files (that's a count, not a size), it takes > quite a while to scan through the whole tree. If we had a .oldest file in > each branch, we could skip that branch if nothing had changed. Then all we > would need to do is scan the tree once to set these branch-stamps. After > that, all the cache machines would have to do is walk the tree looking for > newer stamps. -- steve ulrich (sulrich at botwerks.*)