basename.1 (772B)
- .\" 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-07-28
- .Dt BASENAME 1
- .Os
- .Sh NAME
- .Nm basename
- .Nd print last path component of a path
- .Sh SYNOPSIS
- .Nm
- .Op Ar path
- .Op Ar suffix
- .Sh DESCRIPTION
- .Nm
- prints the last path component of
- .Ar path
- with removing any trailing slashes as well as trailing
- .Ar suffix
- when applicable.
- .Pp
- When
- .Ar path
- isn't given or is an empty string
- .Dq \&.
- is printed.
- .Sh EXIT STATUS
- .Ex -std
- .Sh SEE ALSO
- .Xr dirname 1 ,
- .Xr basename 3
- .Sh STANDARDS
- .Nm
- should be compliant with the
- IEEE Std 1003.1-2024 (“POSIX.1”)
- specification.
- .Sh AUTHORS
- .An Haelwenn (lanodan) Monnier Aq Mt contact+utils@hacktivis.me