rsync more than 131072 files on linux

Matt McCutchen matt at mattmccutchen.net
Sat Jan 26 04:49:24 GMT 2008


On Sat, 2008-01-26 at 05:36 +0100, Eberhard Moenkeberg wrote:
> On Fri, 25 Jan 2008, Mike Frysinger wrote:
> > On Friday 25 January 2008, Eberhard Moenkeberg wrote:
> > > On Fri, 25 Jan 2008, Sylvain Gargasson wrote:
> > > > sho-lnx-001:~ # rsync -av --progress --stats /mnt/source/*
> > > > /mnt/destination/
> > > >
> > > > -bash: /usr/bin/rsync: Argument list too long
> > >
> > > It is just a bash isssue.
> > 
> > bash is just passing the error up from the OS
> 
> Wrong. Bash's command parameter buffer is too small.

No, the error is definitely coming from the OS.  I ran the following
test on my Linux machine:

strace -f -o echo.strace bash -c '/bin/echo {1..1000000}' >/dev/null

The output is here:

http://mattmccutchen.net/private/echo.strace

Note the execve system call near the end that fails with E2BIG.

Matt



More information about the rsync mailing list