pathchk(C)
pathchk --
check pathnames
Syntax
pathchk [ -p ] pathname ...
Description
The pathchk utility checks that the given pathnames are
valid (that is, capable of being used to create or access a file
without causing syntax errors) or portable (that is, no filename
truncation will result).
By default, pathchk checks the pathnames against the
underlying file system. An error message is printed for each
pathname that:
-
is longer than {PATH_MAX} bytes
-
contains any component longer than {NAME_MAX} bytes in its
containing directory
-
contains any component in a directory which is not searchable
-
contains any character which is not valid in its containing
directory
It is not an error if components of a pathname do not exist, as
long as they can be created.
The -p option causes pathchk to perform
portability checks on the pathnames. An error message is printed for
each pathname that:
-
is longer than {POSIX_PATH_MAX} bytes
-
contains any component longer than {POSIX_NAME_MAX} bytes
-
contains any character that is not in the portable filename
character set
Use
getconf(C)
to discover the values of {PATH_MAX},
{NAME_MAX}, {POSIX_PATH_MAX}, and
{POSIX_NAME_MAX} on your system.
Exit values
pathchk returns one of the following exit values:
0-
the pathnames passed all the checks
1-
one or more pathnames is invalid
2-
incorrect usage, or a pathname is too long
See also
getconf(C),
test(C)
Standards conformance
pathchk is conformant with:
ISO/IEC DIS 99452:1992, Information technology Portable Operating System Interface (POSIX) Part 2: Shell and Utilities (IEEE Std 1003.21992);
X/Open CAE Specification, Commands and Utilities, Issue 4, 1992.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003