OS Manuals

dirname(1)

dirname - Strip last component from file name

DIRNAME(1) General Commands Manual DIRNAME(1)

dirname - Strip last component from file name

dirname [OPTION] NAME...

Strip last component from file name

separate output with NUL rather than newline
Print help
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).

v(uutils coreutils) 0.12.0

2026-10-12

uutils 0.12.0-r3 · os · ingested 2026-10-13