I am having trouble finding this information, and trial and error is telling me that the value is very high. So I figured I ask the community to see if anyone knows and can
Copy and paste this command into MacOSX's Terminal app (or iTerm2, xterm or the like)
bash$ cc -dM -E -xc - <<< '#include
Press the ⟨return⟩ or ⟨enter⟩ key to run it and get the result:
#define NAME_MAX 255
#define PATH_MAX 1024
These maximum name and path lengths are
defined in the system header file sys/syslimits.h
which cc (the C compiler) reads from some default location
such as /usr/include/ or somewhere in the Xcode app.
The cryptic switches are documented in man cc but
essentially this example compiles a one line program and
prints all the "macro" definitions into a pipe to grep
which should filter out all but the lines we want to see. Follow man grep down the rabbit hole for details on pattern matching with regular expressions. Similarly,
bash$ cc -dM -E -xc - <<< ''
compiles an empty program and prints all the standard "macro" definitions peculiar to this particular system and compiler — definitely worth a glance under the hood.