linux command xargs: maximum size of the arguments passed by it? linux command xargs: maximum size of the arguments passed by it? linux linux

linux command xargs: maximum size of the arguments passed by it?


Use the --show-limits argument. It will list the existing limits on your system.

$ xargs --show-limitsYour environment variables take up 4108 bytesPOSIX upper limit on argument length (this system): 2090996POSIX smallest allowable upper limit on argument length (all systems): 4096Maximum length of command we could actually use: 2086888Size of command buffer we are actually using: 131072

The group size depends on the length of each argument passed in and the limits listed above.

From the xargs man page, for reference:

The POSIX standard allows implementations to have a limit on the size of arguments to the exec functions. This limit could be as low as 4096 bytes including the size of the environment. For scripts to be portable, they must not rely on a larger value. However, I know of no implementation whose actual limit is that small. The --show-limits option can be used to discover the actual limits in force on the current system.