pathchk(1)


pathchk -- check the validity of a pathname

Synopsis

/u95/bin/pathchk [-p] path . . .

Description

pathchk checks that each path is valid and portable. A path is valid if it can be used to access or create a file without causing syntax errors. (Note that permission errors are not considered syntax errors.)

By default, pathchk checks each component of each path based on the underlying file system. A diagnostic message is written for each path that:

It is not an error (and so no message is written) if one or more components of a path do not exist, so long as a file matching the pathname specified by the missing components could be created without violating any of the checks.

Characters in each path are processed according to the value of LC_CTYPE, see LANG on environ(5).

pathchk has the following options:


-p
Instead of performing the four checks described above, the -p option causes pathchk to write a diagnostic message for each path that: As is obvious, the -p checks are stricter than the default tests.

Examples

Verify that all pathnames in an imported cpio archive are legitimate and unambiguous on the current system:
   pathchk `cpio -ictI archive`
   if [$? -eq 0]
   then
       cpio -icvdum archive


else echo "Could be problems with the file names." exit 1 fi

Verify that all files in the current directory hierarchy could be moved to any POSIX.1 conforming system:

find . -print | xargs pathchk -p

Exit codes

If an error is encountered, pathchk will print an appropriate diagnostic message, skip the path in which the error occurred, and continue with the next path, returning a non-zero result.

If no errors occur, the exit value will be zero.

Files


/usr/lib/locale/locale/LC_MESSAGES/uxcore
language-specific message file (see LANG on environ(5).)

Notices

This command has been updated to handle files greater than 2GB.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 02 June 2005