4

What is a canonical way to find the actual maximum argument list length?

view full story
linux-howto

http://unix.stackexchange.com – Following ARG_MAX, maximum length of arguments for a new process it seems like ARG_MAX is wrongly (or at least ambiguously) defined on my Mac Mini 3,1 running Ubuntu 12.04: $ getconf ARG_MAX # arguments 2097152 $ locate limits.h | xargs grep -ho 'ARG_MAX[ \t]\+[0-9]\+' | uniq | cut -d ' ' -f 8 131072 The actual limit seems to be somewhere between these: $ cd "$(mktemp -d)" $ touch $(seq 1 131072) && find . -mindepth 1 -printf x | wc -c && rm * 131072 $ touch $(seq 1 131073) && find . -mindepth 1 -printf x | wc -c && rm * 131073 $ touch $(seq 1 $(getconf AR (HowTos)