shell命令长度限制
两个命令
ARG_MAX
The limit for the length of a command line is not imposed by the shell, but by the operating system. This limit is usually in the range of hundred kilobytes. POSIX denotes this limit ARG_MAX and on POSIX conformant systems you can query it with
1 | $ getconf ARG_MAX # Get argument limit in bytes |
在我的cygwin上的结果:
1 | ➜ getconf ARG_MAX |
xargs –show-limits
我的Cygwin上的结果
1 | ➜ xargs --show-limits |
绕过限制
使用脚本编写。