CLEANNAME(1)

πŸ“¦
version 0_git20260208 Β· 2 versions
, in alpine 3.24, arch rolling, nixos 26.05, nixpkgs unstable

πŸ’… CLEANNAME(1) Β· General Commands Manual Β· clean a path name πŸ’…

πŸŽ€ NAME πŸŽ€

cleanname β€” clean a path name, bestie ✨

πŸ“œ SYNOPSIS πŸ“œ

cleanname [ -d pwd ] names ...

πŸ› οΈ DESCRIPTION πŸ› οΈ

okay so for each file name argument, cleanname does its thing by lexical processing only β€” no cap, no filesystem side quests β€” and prints the shortest equivalent string that names the same (possibly hypothetical) file πŸ’–.

It eliminates:

  • multiple slashes
  • trailing slashes

and it lexically interprets . and .. directory components in the name πŸ‘‘.

the -d pwd glow-up: if the -d option is present, unrooted names are prefixed with pwd/ before processing πŸ¦‹.

πŸ“‚ SOURCE πŸ“‚

/src/cmd/cleanname.c

πŸ‘€ SEE ALSO πŸ‘€

  • cleanname(3) β€” go read the section 3 bestie, iykyk πŸ’œ

πŸ’– that's the whole CLEANNAME(1) wrap-up from the General Commands Manual β€” mwah! πŸ’‹