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.11.0

2026-09-01