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!
[Solved] MacOS X - Shell - What is the maximum length of a command line statement?
Delphi, Lazarus, Free Pascal
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
Topic starter
April 4, 2016 1:45 AM
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!
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
Topic starter
April 4, 2016 1:49 AM