BASENAME(1)
π
BASENAME(1) β okay so this is basename, bestie
So like, the manual name is basename and it lives in the General Commands Manual section 1, and honestly? It's giving "small but mighty." Let's get into it. π
β¨ NAME β¨
basename β print NAME with any leading directory components removed. If specified, also remove a trailing SUFFIX. π«Ά That's it. That's the whole job. And it ate.
πΈ SYNOPSIS πΈ
basename [-z] NAME [SUFFIX]
basename OPTION... NAME...
Two whole modes, no cap. Either you hand it a NAME (and optionally a SUFFIX), or you go full options mode and give it OPTION... plus NAME.... Pick your fighter. π
π¦ DESCRIPTION π¦
Print NAME with any leading directory components removed. If specified, also remove a trailing SUFFIX.
Lowkey the most straightforward icon in the whole toolchain β you give it a path, it gives you the last bit of that path, and if you tell it about a SUFFIX it'll strip that off the end too. Periodt. β¨
π OPTIONS π
-a,--multipleβ support multiple arguments and treat each as aNAMEπ (more than one bestie at a time, we love to see it)-s,--suffix <SUFFIX>β remove a trailingSUFFIX; implies-aβ (yes bestie, it sneaks in-aall on its own, that's just the vibe)-z,--zeroβ end each output line with NUL, not newline π (for when you're piping into something that wants NUL-separated output β very much iykyk)-h,--helpβ print help π (the classic "wait what does this do again" button)-V,--versionβ print version π (for when you gotta know exactly which build you're running)
π₯ VERSION π₯
v(uutils coreutils) 0.12.0
fr fr, no surprises here β no environment variables, no exit status section, no files, no warnings. Just a clean little utility doing exactly what it says on the tin. π
Okay that's the whole page, bestie β hope it slayed for you π§π
β§ο½₯οΎ uutils coreutils 0.12.0 Β· dated 2026-09-17 Β· BASENAME(1) Β· catch you in the group chat β§ο½₯οΎ
π¦ 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