1

I'm working on a filename convention, and I'm using the POSIX Portable File Name Character Set (e.g. here) as a starting point. I thought I'd run a quick check using 'pathchk -p' (I'm on macOS 11.3, Big Sur) to see how things stand to begin with and I was surprised to find a whole bunch of my files failed the check.

In almost all cases, the reason given was that the length of one or more of the filename components exceeded what's specified in POSIX_NAME_MAX. However, the error message said that limit was only 14 characters, which struck me as very short. I'd have expected at least 255. But, sure enough, 'getconf' confirmed that POSIX_NAME_MAX is indeed 14.

Is a value of 14 really to be expected for POSIX_NAME_MAX?

tkp
  • 197
  • 7
  • This would probably be better asked on Unix and Linux Stack Exchange – Angus L'Herrou Sep 30 '21 at 01:33
  • 1
    `POSIX_NAME_MAX` is *defined* as 14. `pathchk` is checking against the guaranteed minimum support among all POSIX-compliant systems, not anything to do with the limits on your current platform. – jasonharper Sep 30 '21 at 01:41
  • Hmm. Then it sounds like I may be on the wrong track with pathchk in the first place. Thanks for the info. – tkp Sep 30 '21 at 23:18
  • @AngusL'Herrou, I get that pathchk is known as a unix-esque command, but I didn't want to restrict my question to that since I'm running on macOS. – tkp Sep 30 '21 at 23:20

0 Answers0