{
    "mode": "info",
    "parameter": "pathchk",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/pathchk/json",
    "generated": "2026-10-29T17:03:50Z",
    "sections": {
        "File: coreutils.info,  Node: pathchk invocation,  Next: mktemp invocation,  Prev: dirname invocation,  Up: File name manipulation": {
            "content": "",
            "subsections": [
                {
                    "name": "18.3 'pathchk': Check file name validity and portability",
                    "content": "'pathchk' checks validity and portability of file names.  Synopsis:\n\npathchk [OPTION]... NAME...\n\nFor each NAME, 'pathchk' prints an error message if any of these\nconditions is true:\n\n1. One of the existing directories in NAME does not have search\n(execute) permission,\n2. The length of NAME is larger than the maximum supported by the\noperating system.\n3. The length of one component of NAME is longer than its file\nsystem's maximum.\n\nA nonexistent NAME is not an error, so long as a file with that name\ncould be created under the above conditions.\n\nThe program accepts the following options.  Also see *note Common\noptions::.  Options must precede operands.\n\n'-p'\nInstead of performing checks based on the underlying file system,\nprint an error message if any of these conditions is true:\n\n1. A file name is empty.\n\n2. A file name contains a character outside the POSIX portable\nfile name character set, namely, the ASCII letters and digits,\n'.', '', '-', and '/'.\n\n3. The length of a file name or one of its components exceeds the\nPOSIX minimum limits for portability.\n\n'-P'\nPrint an error message if a file name is empty, or if it contains a\ncomponent that begins with '-'.\n\n'--portability'\nPrint an error message if a file name is not portable to all POSIX\nhosts.  This option is equivalent to '-p -P'.\n\nExit status:\n\n0 if all specified file names passed all checks,\n1 otherwise.\n"
                }
            ]
        }
    },
    "flags": [],
    "examples": [],
    "see_also": []
}