maux
Star on GitHub Buy me a coffee

Manual / pathchk

pathchk(1)

PATHCHK(1) General Commands Manual PATHCHK(1)

pathchk - check pathnames for validity/portability

pathchk [ -p ] [ -P ] pathname ...

Pathchk checks each pathname operand and writes a diagnostic to standard error for any that fails. With no option, the limits are this tree's OWN (not the host's): each component at most 15 characters (ProDOS's own directory-entry name_length field), the whole pathname at most 64 characters (MLI_PTH_MAXLN, inc/mli.equ — the same cap MKPATH() enforces for every program in this tree), and each component must begin with a letter and otherwise hold only letters, digits, or a period (ProDOS's own naming rule, case-insensitive). An intermediate component that does not exist is not an error; one that exists and is not itself a directory is.

Check portability instead: the POSIX portable character set ([A-Za-z0-9._-]), 14 characters per component, 255 for the whole pathname (_POSIX_NAME_MAX/_POSIX_PATH_MAX, the XCU's own limits). No existence check is made under -p.
In addition to whichever of the above is active, an empty pathname or a component beginning with - is also a failure.

/usr/man/PATHCHK this page

mkdir(1)

Exit status is 0 if every pathname passed, 1 if any failed, 2 for a usage error.

The whole-pathname length check under -p is limited by an 8-bit counter and so cannot actually observe the difference between 255 and 256 bytes — not a concern on a system whose own absolute pathname cap is 64.

September 15, 2026 maux