OS Manuals

/usr/bin/dirname

Cross-platform Rust rewrite of the GNU coreutils.

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

Strip last component from file name

Usage: dirname [OPTION] NAME...

Options:
  -z, --zero     separate output with NUL rather than newline
  -h, --help     Print help
  -V, --version  Print version

Output each NAME with its last non-slash component and trailing slashes
removed; if NAME contains no /'s, output '.' (meaning the current directory).
Options (3)
OptionDescriptionSource
-z, --zeroseparate output with NUL rather than 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.