OS Manuals

/usr/bin/basename

Cross-platform Rust rewrite of the GNU coreutils.

From uutils 0.12.0-r6 (os), captured 2026-11-07 by running basename --help (exit 0). permalink

Print NAME with any leading directory components removed
If specified, also remove a trailing SUFFIX

Usage: basename [-z] NAME [SUFFIX]
       basename OPTION... NAME...

Options:
  -a, --multiple         support multiple arguments and treat each as a NAME
  -s, --suffix <SUFFIX>  remove a trailing SUFFIX; implies -a
  -z, --zero             end each output line with NUL, not newline
  -h, --help             Print help
  -V, --version          Print version
Options (5)
OptionDescriptionSource
-a, --multiplesupport multiple arguments and treat each as a NAMEhelp + man
-s, --suffix SUFFIXremove a trailing SUFFIX;help + man
-z, --zeroend each output line with NUL, not newlinehelp + man
-h, --helpPrint helphelp + man
-V, --versionPrint versionhelp + man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.