S6-HIERCOPY(1)

πŸ“¦ version 2.3.1.2, in nixpkgs unstable

πŸ’– S6-HIERCOPY(1) πŸ’–

okay so bestie, this is a page from the General Commands Manual β€” welcome to s6-hiercopy, and yes we're gonna get into it 🫢


✨ NAME ✨

s6-hiercopy β€” copy a directory structure recursively. literally what it says on the tin, no cap πŸŽ€


🌸 SYNOPSIS 🌸

s6-hiercopy source destination

two args, that's the whole vibe πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so s6-hiercopy recursively copies source to destination, and destination gets created if it doesn't exist already, periodt. The permissions are preserved. The owner and group are preserved if the user is the superuser πŸ‘‘

It exits 0 on success and 111 on temporary failure.

okay now the story time part because this is genuinely iconic 😭 Copying files and browsing through directories is one of Unix's weakest points, and s6-hiercopy is not meant to work around the problem β€” it's only a quick hack that the author needed to boot an embedded platform. The original plan was to write the ultimate cp utility: portable and reliable and featureful and everything, while needing approximately a hundred times less resources than GNU cp does, of course 🌈 But the idea eventually got dropped: it's impossible to design, much less write, such a utility. Notably, you cannot make it reliable because Unix's set of filesystem management primitives is just too weak β€” it lacks a lot of atomic operations, and filesystem transactions.

heads up bestie: as a result, s6-hiercopy is a walking race condition and should absolutely not be considered instant when used in a multitasking environment πŸ’€ But then, cp shouldn't either. fr fr.

There is no standard way of creating device nodes on a filesystem, so any cp-like utility is inherently non-portable πŸ™ˆ Fortunately, most systems still agree on the non-portable usages of the mknod specification[1], so things should work in practice. Consequently, the s6-hiercopy utility has been moved from s6-linux-utils[2] to s6-portable-utils ✨


πŸ’… EXIT STATUS πŸ’…

  • 111 β€” Temporary error.
  • 100 β€” Permanent error, such as a misuse.
  • 127 β€” Unable to execute program - not found.
  • 126 β€” Unable to execute program - other reason.

πŸ“ SEE ALSO πŸ“

the whole squad, gathered, main character energy only πŸ‘‘:

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-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), s6-update-symlinks(1), seekablepipe(1)

and the footnotes, so you can go read the receipts yourself πŸ”₯

This man page is ported from the authoritative documentation at: https://skarnet.org/software/s6-portable-utils/s6-hiercopy.html πŸ’œ


🧚 AUTHORS 🧚

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

and that's the whole page bestie, slay πŸ’–βœ¨ this one came to you from Debian, dated April 18, 2022 β€” mwah, go copy some directories responsibly πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from