Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pathchk(1) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

test(1)

limits(4)



PATHCHK(1)                                                          PATHCHK(1)



NAME
     pathchk - check pathnames

SYNOPSIS
     pathchk [-p path] pathname...

DESCRIPTION
     pathchk checks that one or more pathnames are valid (that is, they could
     be used to access or create a file without causing syntax errors) and
     portable  (that is, no filename truncation will result).  More extensive
     portability checks are provided by the -p option.

     By default, the pathchk utility will check each component of each
     pathname operand based on the underlying file system.   A diagnostic will
     be written for each pathname operand that:

     ⊕   is longer than PATH_MAX bytes

     ⊕   contains any component longer than NAME_MAX bytes in its
         containing directory

     ⊕   contains any in a directory that is not searchable

     ⊕   contains any character in any component that is not valid in its
         containing directory.

     The -p option will cause checks to be done on each pathname operand and a
     diagnostic message to be written if each of the pathname operands:

     ⊕   is longer than _POSIX_PATH_MAX bytes

     ⊕   contains any component longer than _POSIX_PATH_MAX bytes

     ⊕   contains any character in any comonent that is not in the portable
         filename character set.

RETURN VALUES
     pathchk exits with a status of greater than 0 if any errors are
     encountered, otherwise it exits with status 0.

     If the pathname argument contains a name that doesn't exist, then this is
     not considered an error as long as a file could be created with this
     name.












                                                                        Page 1





PATHCHK(1)                                                          PATHCHK(1)



EXAMPLE
     To verify that all pathnames in an imported data interchange archive are
     legitimate  and unambiguous on the current system:

         pax -f archive | sed -e '/ == .*/s///' | xargs pathchk
         if [ $? -eq 0 ]
         then
            pax -r -f archive
         else
            echo Investigate problems before importing files.
            exit 1
         fi

SEE ALSO
     test(1), limits(4)








































                                                                        Page 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026