On Mon, Feb 09, 2009 at 02:13:55PM -0500, Wietse Venema wrote:
> >
> > One minor nit in the document, it uses "xargs" to collect a file list for
> > "tar", but the file list may be too long for one command invocation:
> >
> > % cd INSTALL_ROOT
> > % rm -f SOMEWHERE/outputfile
> > % find . \! -type d -print | xargs tar cf SOMEWHERE/outputfile
> > % gzip SOMEWHERE/outputfile
> >
> > With "tar c", only the last batch of files are in the tar archive. The
> > command should be "tar rf" not "tar cf".
>
> On what systems does the list exceed the NCARGS command length limit?
xargs(1) does not use "NCARGS", rather it uses various smaller limits:
(
exec 2>/dev/null
for i in 1 10 100 1000
do
printf -- "--- %d ---\n" $i
yes $(printf "%0${i}d" 0) | head -n1 | wc
yes $(printf "%0${i}d" 0) | head -n10000 |
xargs echo 2>/dev/null | head -1 | wc
done
)
RHEL 3.0: ~24k input buffer:
--- 1 ---
1 1 2
1 1024 2048
--- 10 ---
1 1 11
1 1024 11264
--- 100 ---
1 1 101
1 238 24038
--- 1000 ---
1 1 1001
1 24 24024
RHEL 4.0: ~24k input buffer
--- 1 ---
1 1 2
1 1024 2048
--- 10 ---
1 1 11
1 1024 11264
--- 100 ---
1 1 101
1 252 25452
--- 1000 ---
1 1 1001
1 25 25025
SunOS 5.8: ~2k input buffer
--- 1 ---
1 1 2
1 254 508
--- 10 ---
1 1 11
1 185 2035
--- 100 ---
1 1 101
1 20 2020
--- 1000 ---
1 1 1001
1 2 2002
--
Viktor.
Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.
To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:[email protected]?body=unsubscribe%20postfix-users>
If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.