S6-LN(1)

πŸ“¦ version 2.3.1.2, in nixpkgs unstable

okay so bestie, welcome to S6-LN(1), which lives in the General Commands Manual section and is genuinely one of those little tools you'll reach for constantly once you get it. it makes links. that's the whole vibe. πŸŽ€


✨ SYNOPSIS ✨

s6-ln [-n] [-s] [-f] [-L] [-P] source target

🌸 DESCRIPTION 🌸

s6-ln is literally just the generic ln[1] utility. that's it. that's the tweet. it acts as the generic ln[1] utility, no cap. 🫢


πŸ‘‘ OPTIONS πŸ‘‘

  • -s β€” make a symbolic link instead of a hard link. soft girl link energy πŸ’–
  • -f β€” force it. if the target already exists, it gets replaced. no asking, no crying.
  • -L β€” link the targets of symlinks in source... like, follow the symlink and link whatever it points at. πŸ”₯
  • -P β€” link the symlinks in source... themselves. don't follow them, link the link. πŸ’…
  • -n β€” if target is a symlink to a directory, replace it instead of adding a link inside the directory. this is the "not me accidentally dropping my link into some folder" flag 😭

⭐ EXIT STATUS ⭐

  • 111 β€” temporary error. it's giving "try again later" πŸ™ˆ
  • 100 β€” permanent error, like a misuse. yeah that one's on you bestie πŸ’€
  • 127 β€” unable to execute program β€” not found.
  • 126 β€” unable to execute program β€” other reason.

πŸ¦‹ SEE ALSO πŸ¦‹

okay this list is a whole friend group, get comfy:

s6-basename(1), s6-cat(1), s6-chmod(1), s6-chown(1), s6-clock(1), s6-cut(1), s6-dirname(1), s6-dumpenv(1), s6-echo(1), s6-env(1), s6-expr(1), s6-false(1), s6-format-filter(1), s6-grep(1), s6-head(1), s6-hiercopy(1), s6-linkname(1), s6-ls(1), s6-maximumtime(1), s6-mkdir(1), s6-mkfifo(1), s6-nice(1), s6-nuke(1), s6-pause(1), s6-printenv(1), s6-quote(1), s6-quote-filter(1), s6-rename(1), s6-rmrf(1), s6-seq(1), s6-sleep(1), s6-sort(1), s6-sync(1), s6-tai64ndiff(1), s6-tail(1), s6-touch(1), s6-true(1), s6-uniquename(1), s6-unquote(1), s6-unquote-filter(1), s6-update-symlinks(1), seekablepipe(1)

this man page is ported from the authoritative documentation at: https://skarnet.org/software/s6-portable-utils/s6-ln.html 🌈


🧚 STANDARDS 🧚

so s6-ln would be suitable as a ln[1] program conforming to , except that POSIX mandates a preexisting target must first be unlink(2)ed and then link(2)ed / symlink(2)ed β€” which, and I cannot stress this enough, prevents atomic replacements. πŸ’€ not it.

s6-ln aims to be reliable and to allow for atomic replacements, so it deviates from POSIX on that point: when target exists and needs to be replaced, s6-ln first creates a (sym)link to a unique temporary name, then rename(2)s the temporary name to target.

this behaviour makes sure that target is atomically replaced β€” there's no point in time where it does not exist. main character consistency, honestly. πŸ‘‘

πŸ’œ AUTHORS πŸ’œ

  • Laurent Bercot
  • Alexis <flexibeast@gmail.com> (man page port)

and that's the whole page bestie, you ate πŸ’…βœ¨ β€” brought to you by Debian, dated April 17, 2022. go link something iconic. πŸ¦‹πŸ’–πŸŽ€

πŸ“¦ where this page comes from