Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 10 down vote accepted

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.

share|improve this answer
On Solaris 10, it is 1048320 - both are so big that they boggle the mind that someone might run out of it. – Jonathan Leffler Sep 29 '09 at 2:53
Excellent. I guess I was a was away yet. lol – DGM Sep 29 '09 at 3:17

It depends on the shell, but the last time I ran a configure script using zsh on 10.6 it was 65535 characters.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.