DIRNAME(1)

πŸ“¦ version 0.12.0, in arch rolling

✨ 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 of dirname you'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