You are not logged in.
Pages: 1
This is kind of a basic question, but I can't seem to figure it out. Is there a way to get rsync to only print to stdout when it adds or deletes a file?
For example, with -v rsync prints something like this (the output is not verbatim, but an example of the output format I see):
$ rsync --delete -ahv [src] [dest]
distros
distros/arch
distros/mint
distros/mint/new-file.png
distros/ubuntu
deleting distros/ubuntu/old-file.png
I would like to get rsync to instead print something roughly like this:
$ rsync --delete -ahv [src] [dest]
adding distros/mint/new-file.png
deleting distros/ubuntu/old-file.png
Is it possible to get rsync to report information that way? I ask because I use rsync to transfer files to Rockbox, and with hundreds of music folders, it's hard to see what's added and deleted with each run.
Thanks as always.
Last edited by jalu (2010-07-09 18:12:52)
Offline
Hey falconindy. Thanks for the reply.
The only problem is that rsync does not print the word "adding" when adding a file. Instead it only prints the name of the filename that was added, which is of course difficult to grep for.
For example:
$ rsync --delete -ahv [src] [dest]
distros
distros/arch
distros/mint
distros/mint/new-file.png // Adds a file.
distros/ubuntu
deleting distros/ubuntu/old-file.png // Deletes a file.
I've looked into different formatting options such as rsync -i and rsync with multiple levels of verbosity, but unfortunately nothing prints simple adds/deletes or makes it easy to parse for adds/deletes.
But thanks for the info. At the very least, thanks for introducing me to some new grep syntax! :-)
Offline
As for now --itemize-changes option could be usefull.
Offline
Pages: 1