pathchk invocation (GNU Coreutils 9.0)
18.3 pathchk: Check file name validity and portability
pathchk checks validity and portability of file names. Synopsis:
pathchk [option]… name…
pathchk prints an error message if any of these conditions is true:
- One of the existing directories in
namedoes not have search (execute) permission,
- The length of
nameis larger than the maximum supported by the operating system.
- The length of one component of
nameis longer than its file system’s maximum.
name is not an error, so long as a file with that name could be created under the above conditions.
The program accepts the following options. Also see Common options. Options must precede operands.
Instead of performing checks based on the underlying file system, print an error message if any of these conditions is true:
- A file name is empty.
- A file name contains a character outside the POSIX portable file name character set, namely, the ASCII letters and digits, ‘
-’, and ‘
- The length of a file name or one of its components exceeds the POSIX minimum limits for portability.
Print an error message if a file name is empty, or if it contains a component that begins with ‘
Print an error message if a file name is not portable to all POSIX hosts. This option is equivalent to ‘
0 if all specified file names passed all checks, 1 otherwise.