CLEANNAME(1plan9)

okay bestie, welcome to cleanname from the 1plan9 manual section β€” CLEANNAME(1plan9), iykyk πŸ’…

NAME 🧼

cleanname β€” clean a path name πŸ’–

SYNOPSIS ✨

cleanname [ -d pwd ] names ...

DESCRIPTION πŸ’…

okay so for each file name argument, cleanname does its thing by lexical processing only and prints the shortest equivalent string that names the same (possibly hypothetical) file. no cap. 🫧

it eliminates multiple and trailing slashes, and it lexically interprets . and .. directory components in the name. yes, it's giving path-glow-up ✨

  • -d pwd β€” if the -d option is present, unrooted names are prefixed with pwd/ before processing. πŸ’–
lexical only, bestie. it's string surgery, not filesystem snooping. πŸ”₯

SOURCE πŸ“

/src/cmd/cleanname.c

SEE ALSO πŸ‘€

cleanname(3).


that's the whole page πŸŽ€ source file: /src/cmd/cleanname.c; manual tag/version: <rainbow>CLEANNAME(1plan9)</rainbow>; date: the footer didn't give me one bestie, just the tag. mwah πŸ’‹

πŸ“¦ where this page comes from