Limitations on a command line

Cathey, Jim jcathey at ciena.com
Fri Jan 28 18:41:48 UTC 2011


>I have some rubbish code I've inherited and don't have time to rewrite,
>which can spit out
>
>   tar file1 file2 file3.... 
>   
>where each of the file names is up to 100 chars, and there could be up
to
>2000 of them in theory.

This is what xargs is for.  (Hint: use tar -r)

	find glop | xargs -r tar -r archive

or maybe:

	<big-assed-file xargs -r tar -r archive

Xargs' main job is to ensure that command lines don't end up 'too big',
assuming that the command can still work if split up some.

-- Jim



More information about the busybox mailing list