argument list too long

Dan Nelson dnelson at allantgroup.com
Wed Feb 27 15:29:48 UTC 2008


In the last episode (Feb 27), Wojciech Puchar said:
>> one can easily write:
>> 
>> 	find . -name '*.ogg' | \
>> 	while read file ; do \
>> 		blah "${file}"
>> 	done
>> 
>> xargs(1) is another popular tool for processing large argument lists:
>> 
>> 	find -name '*.ogg' | xargs blah
> 
> unless program "blah" starts slowly, and it's better to give it 2000
> params at once.
> 
> but i've asked to be sure what is actual limit, and used xargs -n
> 2000 to do the rest.

That's less than xargs's default of 5000 :)  The xargs manpage explains
it all.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list