Bash – the maximum length of a command line in Mac OS X

bashmac-osx

I'm generating models in Ruby on Rails, and some of these tables have an awful lot of columns. What's maximum length of a command in Mac OS X?

Best Answer

The limit is not in bash but in your operating system. It's defined by the value of ARG_MAX in your OS's limits.h. You can get the value by running getconf ARG_MAX. On my OSX 10.5 machine (and most other BSD systems) it's 262144. You can read more about this limit here.