basename(1)

πŸ“¦
version 0.7.0 Β· 3 versions
, in epel 10, fedora 43, fedora 44

✨ 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 -a for 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