basename(1)
β¨ basename(1) β General Commands Manual β¨
okay bestie, welcome to the basename page π it lives in the General Commands Manual section (section 1, the iconic one), and it's about to become your new fave.
πΈ NAME πΈ
basename β print NAME with any leading directory components removed. If specified, also remove a trailing SUFFIX π
π¦ SYNOPSIS π¦
basename [-a|--multiple] [-s|--suffix] [-z|--zero] [-h|--help]
[-V|--version] [name]
π DESCRIPTION π
Print NAME with any leading directory components removed. If specified, also remove a trailing SUFFIX.
that's literally it and that's literally the whole vibe β¨ you hand it a path, it hands you back just the last lil piece. no folders, no drama. and if you want, it'll also snip a suffix off the end for you. lowkey essential.
π OPTIONS π
-a,--multipleβ support multiple arguments and treat each as a NAME π so instead of one path at a time, you can dump a whole lil lineup in there.-s,--suffix <SUFFIX>β remove a trailing SUFFIX; implies-aπ note that implication bestie, it turns on-afor you. no cap.-z,--zeroβ end each output line with NUL, not newline π«Ά for when you're piping into something that wants NUL-separated stuff (iykyk).-h,--helpβ print help β¨-V,--versionβ print version π
β VERSION β
v(uutils coreutils) 0.7.0
and that's the whole page, bestie π¦ slay, you now know basename fr fr. this iconic lil number comes to you from basename (uutils coreutils) 0.7.0 β that's the source and the version right there, keep it in your heart π mwah, go strip some directories ππ
π¦ where this page comes from
- epel 10: rust-coreutils-devel 0.7.0-10.el10_3 Β· MIT
- epel 10: uutils-coreutils 0.7.0-10.el10_3 Β· (MIT OR Apache-2.0) AND Unicode-DFS-2016 AND Zlib AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR Apache-2.0 WITH LLVM-exception) AND (Apache-2.0 OR GPL-2.0-only) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND CC0-1.0 AND ISC AND MIT AND (MIT OR Zlib OR Apache-2.0) AND (MIT-0 OR Apache-2.0) AND Unicode-3.0 AND (Unlicense OR MIT)
- fedora 43: rust-coreutils-devel 0.7.0-12.fc43 Β· MIT
- fedora 43: uutils-coreutils 0.7.0-12.fc43 Β· (MIT OR Apache-2.0) AND Unicode-DFS-2016 AND Zlib AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR Apache-2.0 WITH LLVM-exception) AND (Apache-2.0 OR GPL-2.0-only) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND CC0-1.0 AND ISC AND MIT AND (MIT OR Zlib OR Apache-2.0) AND (MIT-0 OR Apache-2.0) AND Unicode-3.0 AND (Unlicense OR MIT)
- fedora 44: rust-coreutils-devel 0.7.0-4.fc44 Β· MIT
- fedora 44: uutils-coreutils 0.7.0-4.fc44 Β· (MIT OR Apache-2.0) AND Unicode-DFS-2016 AND Zlib AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR Apache-2.0 WITH LLVM-exception) AND (Apache-2.0 OR GPL-2.0-only) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND CC0-1.0 AND ISC AND MIT AND (MIT OR Zlib OR Apache-2.0) AND (MIT-0 OR Apache-2.0) AND Unicode-3.0 AND (Unlicense OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms