pathchk.1 (1481B)
- .\" utils-std: Collection of commonly available Unix tools
- .\" Copyright 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
- .\" SPDX-License-Identifier: MPL-2.0
- .Dd 2024-04-19
- .Dt PATHCHK 1
- .Os
- .Sh NAME
- .Nm pathchk
- .Nd check pathname validity
- .Sh SYNOPSIS
- .Nm
- .Op Fl pP
- .Ar pathname...
- .Sh DESCRIPTION
- .Nm
- checks each
- .Ar pathname
- for their validity and portability.
- .Pp
- By default,
- .Nm
- does the following checks, based on the underlying filesystem:
- .Bl -bullet
- .It
- Isn't longer than PATH_MAX
- .It
- Doesn't have any path component longer than NAME_MAX
- .It
- Is reachable to the current user
- .It
- Doesn't contains invalid bytes
- .El
- .Pp
- Note that non-existing path components aren't seen as an error by
- .Nm .
- .Sh OPTIONS
- .Bl -tag -width ee
- .It Fl p
- Do not perform checks against the underlying filesystem, meaning:
- .Bl -bullet -compact
- .It
- _POSIX_PATH_MAX is used instead of PATH_MAX
- .It
- _POSIX_NAME_MAX is used instead of NAME_MAX
- .It
- Directories aren't checked for user reachability
- .It
- POSIX Portable Character Set is the only reference for invalid byte sequences
- .El
- .It Fl P
- Perform the following additional checks:
- .Bl -bullet -compact
- .It
- Doesn't contains a path component whose first character is the <hyphen-minus> character
- .It
- Isn't empty
- .El
- .El
- .Sh EXIT STATUS
- .Ex -std
- .Sh SEE ALSO
- .Xr test 1
- .Sh STANDARDS
- .Nm
- should be compliant with
- IEEE Std 1003.1-2024 (“POSIX.1”)
- specification.
- .Sh AUTHORS
- .An Haelwenn (lanodan) Monnier Aq Mt contact+utils@hacktivis.me