Limitations on a command line

Denys Vlasenko vda.linux at
Sun Jan 30 05:53:49 UTC 2011

On Friday 28 January 2011 19:26, David Collier wrote:
> Is there any explicit limit on the size of command like busybox can swing
> round it's head?
> 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.
> I can change the limits to keep it all under 64 k or whatever... but is
> there a magic number even smaller than that I should beware of?
> I think I can tame this by suitable use of relative paths, but I'd still
> be interested to know

# busybox tar --help
BusyBox v1.18.0 (2010-11-23 00:11:12 CET) multi-call binary.

Usage: tar -[cxtzjaZmvO] [-X FILE] [-f TARFILE] [-C DIR] [FILE]...

Create, extract, or list files from a tar file

        c       Create
        x       Extract
        t       List
        f       Name of TARFILE ('-' for stdin/out)
        C       Change to DIR before operation
        v       Verbose
        z       (De)compress using gzip
        j       (De)compress using bzip2
        a       (De)compress using lzma
        Z       (De)compress using compress
        O       Extract to stdout
        h       Follow symlinks
        m       Don't restore mtime
        exclude File to exclude
        X       File with names to exclude
        T       File with names to include


More information about the busybox mailing list