manpagez: man pages & more
info coreutils
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

18.3 pathchk: Check file name portability

pathchk checks portability of file names. Synopsis:

 
pathchk [option]… name

For each name, pathchk prints a message if any of these conditions is true:

  1. One of the existing directories in name does not have search (execute) permission,
  2. The length of name is larger than the maximum supported by the operating system.
  3. The length of one component of name is longer than its file system's maximum.

A nonexistent name is not an error, so long a file with that name could be created under the above conditions.

The program accepts the following options. Also see Common options. Options must precede operands.

-p

Instead of performing checks based on the underlying file system, print a message if any of these conditions is true:

  1. A file name is empty.
  2. The length of a file name or one of its components exceeds the POSIX minimum limits for portability.
  3. A file name contains a character outside the portable file name character set, namely, the ASCII letters and digits, ‘-’, ‘.’, ‘/’, and ‘_’.
-P

Print a message if a file name is empty, or if it contains a component that begins with ‘-’.

--portability

Print a message if a file name is not portable to all POSIX hosts. This option is equivalent to ‘-p -P’.

Exit status:

 
0 if all specified file names passed all checks,
1 otherwise.

© manpagez.com 2000-2017
Individual documents may contain additional copyright information.