Conditional action based on whether any file in a directory has a ctime newer than X

Posted by jberryman on Stack Overflow See other posts from Stack Overflow or by jberryman
Published on 2010-04-01T20:02:31Z Indexed on 2010/04/01 23:33 UTC
Read the original article Hit count: 300

Filed under:
|
|
|

I would like to run a backup job on a directory tree from a bash script if any of the files have been modified in the last 30 minutes. I think I can hack together something using find with the -ctime flag, but I'm sure there is a standard way to examine a directory for changes.

I know that I can inspect the ctime of the top level directory to see if files were added, but I need to be able to see changes also.

FWIW, I am using duplicity to backup directories to S3.

© Stack Overflow or respective owner

Related posts about s3

Related posts about backup