Manual / pathchk
pathchk(1)
| PATHCHK(1) | General Commands Manual | PATHCHK(1) |
NAME
pathchk - check pathnames for validity/portability
SYNOPSIS
pathchk [ -p ] [ -P ] pathname ...
DESCRIPTION
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.
OPTIONS
- -p
- 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.
- -P
- In addition to whichever of the above is active, an empty pathname or a component beginning with - is also a failure.
FILES
/usr/man/PATHCHK this page
SEE ALSO
DIAGNOSTICS
Exit status is 0 if every pathname passed, 1 if any failed, 2 for a usage error.
BUGS
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 |