DIRNAME(1)
β¨ NAME β¨
dirname β the little icon that strips the last component off a file name π
π« SYNOPSIS π«
dirname [OPTION] NAME...
πΈ DESCRIPTION πΈ
Strip last component from file name. That's it, that's the whole vibe β it takes your path and yeets the last piece off the end π
π¦ OPTIONS π¦
-z,--zeroβ separate output with NUL rather than newline. Ngl this one's for the girlies piping into other tools that hate newlines π«Ά-h,--helpβ Print help. Your emotional support flag π-V,--versionβ Print version. So you know exactly which era ofdirnameyou're living in β
π₯ EXTRA π₯
Okay so here's the actual tea, bestie β the real behavior lives here β
Output each NAME with its last non-slash component and trailing slashes removed; if NAME contains no /'s, output . (meaning the current directory).
Read that again fr fr: no slash in your input? You get a . back. It's giving "I looked everywhere and the answer is right here" πβ¨
π VERSION π
v(uutils coreutils) 0.12.0
And that's the whole page, bestie β no cap, every flag and every rule accounted for π§π This iconic little number dropped 2026-09-17, brought to you by the uutils coreutils girlies at version 0.12.0 β go strip some paths, you absolute main character ππ
π¦ where this page comes from
- arch rolling: uutils-coreutils 0.12.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms