S6-UPDATE-SYMLINKS(1)
π¦ S6-UPDATE-SYMLINKS β the manual page, bestie edition
okay so first things first: this is s6-update-symlinks(1), from the General Commands Manual, and it's genuinely one of those tools that looks scary and then turns out to be iconic. let's get into it π
β¨ NAME β¨
s6-update-symlinks β links the content of several similar directory trees under a single tree. that's the whole vibe.
πΈ SYNOPSIS πΈ
s6-update-symlinks d src1 src2 [...]
π DESCRIPTION π
so s6-update-symlinks links the content of several similar directory trees under a single tree. main character use case? replacing search paths like PATH or MANPATH by creating one unique access tree based on the source trees. name conflicts get solved by giving precedence to the last named directory. subdirectories are created exactly as needed, and what can be shared is shared. no wasting, no cap.
it's useful when you wanna combine a logical package system β like Dan Bernstein's /package[1] and /command[2] β with physical filesystem constraints, like /, /usr and /usr/local living on separate filesystems. yes bestie, that's the whole point.
dis the destination directory. it will be created if it doesn't exist. πsrc1,src2, ... are the directories containing the files to be linked.dandsrcnmust be absolute paths, elses6-update-symlinksrefuses to run. and honestly? using relative paths doesn't make sense here anyway.
now the rules of the game, fr fr:
- if
src2is empty, thendbecomes a link tosrc1. - if
src1is empty or entirely overridden bysrc2, thendbecomes a link tosrc2. - if
src1/fileexists but notsrc2/file, thendbecomes a real directory andd/filea link tosrc1/file. then ifsrc2/file2exists,d/file2links to it. - and so on with other
srcdirectories, and subdirs. π
exit status tea β: if s6-update-symlinks manages to perform all the requested tasks, it exits 0. if it encounters a hard error, it exits 111. if it's unable to resolve a conflict between given sources, it exits 100.
π₯ EXIT STATUS π₯
100β Unable to resolve conflict between sources.111β Temporary error.100β Permanent error, such as a misuse. (yes,100shows up twice in this page β that's literally what the doc says, so I'm not touching it π)127β Unable to execute program - not found.126β Unable to execute program - other reason.
π«Ά EXAMPLES π«Ά
s6-update-symlinks /command /bin /sbin /usr/bin /usr/sbin
/usr/local/bin /usr/local/sbin
makes all files under /bin, ..., /usr/local/sbin available under /command. the programs linked are the same as the ones that would be accessed with PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin". obsessed. β¨
s6-update-symlinks /package /initrd/package /slash/package
/usr/package /usr/local/package
builds a /package hierarchy with what it finds in the listed directories. this allows oddities like, for instance, having the daemontools sources in /usr/package/admin/daemontools/src, and the daemontools binaries in /initrd/package/admin/daemontools/bin, but accessing both through /package/admin/daemontools/. literally the dream setup ππ
π SEE ALSO π
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-ln(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), seekablepipe(1)
[1] https://cr.yp.to/slashpackage.html
[2] https://cr.yp.to/slashcommand.html
this man page is ported from the authoritative documentation at: https://skarnet.org/software/s6-portable-utils/s6-update-symlinks.html β ty to the source, always π
π AUTHORS π
Laurent Bercot Alexis <flexibeast@gmail.com> (man page port)
and that's the page, bestie π huge shoutout to the Debian crew β this one's stamped Debian, dated April 18, 2022, and it lives under S6-UPDATE-SYMLINKS(1). now go forth and symlink slay β¨π¦πΈ
π¦ where this page comes from
- nixpkgs unstable: s6-portable-utils 2.3.1.2
- nixpkgs unstable: s6-portable-utils-man-pages 2.3.1.1.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms