pathchk ( 1 ) USER COMMANDSpathchk ( 1 )


NAME

pathchk - check pathnames for portability

SYNOPSIS

pathchk [ options ] pathname ...

DESCRIPTION

pathchk checks each pathname to see if it is valid and/or portable. A pathname is valid if it can be used to access or create a file without causing syntax errors. A file is portable, if no truncation will result on any conforming POSIX.1 implementation.

By default pathchk checks each component of each pathname based on the underlying file system. A diagnostic is written to standard error for each pathname that:
-
Is longer than $(getconf PATH_MAX) bytes.
-
Contains any component longer than $(getconf NAME_MAX) bytes.
-
Contains any directory component in a directory that is not searchable.
-
Contains any character in any component that is not valid in its containing directory.
-
Is empty.

OPTIONS

-p, --portability
Instead of performing length checks on the underlying file system, write a diagnostic for each pathname operand that:
-
Is longer than $(getconf _POSIX_PATH_MAX) bytes.
-
Contains any component longer than $(getconf _POSIX_NAME_MAX) bytes.
-
Contains any character in any component that is not in the portable filename character set.
-
Is empty.

EXIT STATUS

0
All pathname operands passed all of the checks.
>0
An error occurred.

SEE ALSO

getconf(1), creat(2), pathchk(2)

IMPLEMENTATION

version
pathchk (AT&T Research) 2006-09-19
author
Glenn Fowler <gsf@research.att.com>
author
David Korn <dgk@research.att.com>
copyright
Copyright © 1992-2008 AT&T Intellectual Property
license
http://www.opensource.org/licenses/cpl1.0.txt