3

When rsyncing a folder with a million files,

a million lines are output to stduot/stderr, containing the file names.

(I'm using Travis CI, and this trips it up because their log files can be max 4MB)

How can I tell rsync to not "tell me the file names it's processing"

I still want to hear about hiccups/errors, I just don't want a listing of the files it transferred.

My command is:

sudo rsync -avh --no-specials --exclude="foo/" src/ dst/

2 Answers 2

3

To make rsync less verbose, don't use the -v switch, whose entire purpose it to give verbose output including a list of all files transfered.

I would suggest using rsync --stats -ah [...] based on your example command.

3

Besides removing -v, when you still need to see some files only but not all you can use grep, for example:

rsync -avh src/ dst/ | grep file_i_want_to_see*.txt

or

rsync -avh src/ dst/ | grep -v string_i_want_to_hide

note -v in the last grep.

2
  • Didnt work; I think because pipe and grep arent applied until after the entire transfer is done. With millions of files, this could be an hour
    – Nay
    Commented Feb 22, 2019 at 4:09
  • For the record, the pipe and grep are applied as soon as the process generates any output
    – Brandon
    Commented Nov 16, 2020 at 18:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .