using rsync to get filestats
Matt McCutchen
matt at mattmccutchen.net
Tue Oct 14 03:57:06 GMT 2008
On Mon, 2008-10-13 at 22:50 -0400, Mag Gam wrote:
> Would it be more efficient to use rsync to get filestats instead of
> using the 'find' command? I would like to know how big a directory is
> on a filesystem, but this directory has millions of small files. I was
> wondering if rsync would be more efficient than find when using "-n"
> options.
I assume that by "filestats" you mean stat(2) information for each file,
not aggregate statistics. My guess is that "find" would be faster than
"rsync -n" because it doesn't send the stat information to other
processes like rsync does. In addition, "find -printf" has a
configurable output format, while the "rsync --list-only" output format
is fixed.
Matt
More information about the rsync
mailing list