Any option in rsync to get the list of new files

Wayne Davison wayned at samba.org
Tue Feb 15 02:08:51 GMT 2005


On Mon, Feb 14, 2005 at 08:43:00PM +0530, sanalkumar.siva at wipro.com wrote:
> Is there any option in rsync to get the list of new files when we
> use rsync to perform the backup from the source to destination?

One choice is to run two rsync commands, the first with --existing,
which would give you a list of files that were being updated, and then
the second with --ignore-existing, which would give you a list of files
that were being created.  If you use the --log-format option instead of
-v, the output is even easier for a script to parse.  For instance:

rsync -a --existing --log-format='%t %o %f' src/ dest/ | tee out.txt

That would output lines like this:

2005/02/14 18:05:52 send foobar.txt
2005/02/14 18:05:52 send barbaz.c

..wayne..


More information about the rsync mailing list