pruning old files

Michael Salmon Michael.Salmon at
Tue Oct 22 06:35:01 EST 2002

On Tuesday, October 22, 2002 09:46:36 AM +0900 Shinichi Maruyama 
<marya at> wrote:
| jw> In the past i found that using find was quite good for this.
| jw> Use touch to create a file with a mod_time just before you
| jw> started the last sync.  Then from inside $src run
| jw> 	find .  -newer $touchfile -print|cpio -pdm $dest
| For pruning, how about to add the feature to rsync.
| Is it difficult ?
| 	--exclude-older=SECONDs
| 		exclude files older than SECONDs before
| 	--ignore-older=SECONDs
| 		ignore any operations with the files older than
| 		SECONDs before
| 		differ from --exclude-olders, these files are not
| 		affected from --include files or --delete-excluded

Wouldn't a better solution be to add a file list option, similar to cpio, 
to rsync? That would also satisfy those who want complex include and 
exclude rules. Probably 2 options are required, one for newline terminated 
names and the other for null terminated names.

This space intentionally left non-blank.

More information about the rsync mailing list