Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!



Share:
Notifications
Clear all

[Solved] MacOS X - Shell - What is the maximum length of a command line statement?

2 Posts
1 Users
0 Reactions
2,503 Views
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
Topic starter  

When executing external programs, as if they were ran in the command line (a.k.a. Shell, a.k.a. Terminal), it might be necessary to determine how long this statement can be ... you know, when you pass a lot of data on the command line for example.

To find out (under MacOS X, maybe Linux too) what the maximum length of a command line statement is, execute the following:

getconf ARG_MAX

Under El Capitan (Mac) this gives the answer that a command line statement cannot exceed 262144 characters ... that's a lot!


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
Topic starter  

See also ARG_MAX.


   
ReplyQuote
Share: