Delete files specified in "--from-files"-file that don't exist
on the sender side
Matt McCutchen
matt at mattmccutchen.net
Fri Mar 6 21:44:56 GMT 2009
On Sat, 2009-02-28 at 09:36 -0800, Wayne Davison wrote:
> I added an option to the latest development version that supports this:
> --delete-missing-args.
Nice work! I feared the implementation would be much messier. Two
issues you may wish to correct (or I might do it and post the patch):
1. The --chmod option (as used by my handy cp2 alias) breaks
--delete-missing-args. Probably --delete-missing-args should just check
the S_IFMT part of the mode.
2. The "missing" file-list entries show up like this in --list-only
output:
---------- 0 1969/12/31 19:00:00 B
Let me suggest putting "*missing" in the first field and perhaps
omitting the size and mtime.
While you're hacking on those areas of code, perhaps you would consider
adding a --sources-if-exist option to treat the nonexistence of a source
argument or --files-from entry as not an error. This was originally
proposed at:
http://lists.samba.org/archive/rsync/2007-December/019378.html
--
Matt
More information about the rsync
mailing list