about summary refs log tree commit diff
path: root/doc/s6-hiercopy.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/s6-hiercopy.html')
-rw-r--r--doc/s6-hiercopy.html66
1 files changed, 66 insertions, 0 deletions
diff --git a/doc/s6-hiercopy.html b/doc/s6-hiercopy.html
new file mode 100644
index 0000000..e8dd2ed
--- /dev/null
+++ b/doc/s6-hiercopy.html
@@ -0,0 +1,66 @@
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>s6-linux-utils: the s6-hiercopy program</title>
+    <meta name="Description" content="s6-linux-utils: the s6-hiercopy program" />
+    <meta name="Keywords" content="s6 linux administration root utilities hiercopy cp -a" />
+    <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> -->
+  </head>
+<body>
+
+<p>
+<a href="index.html">s6-linux-utils</a><br />
+<a href="http://skarnet.org/software/">Software</a><br />
+<a href="http://skarnet.org/">skarnet.org</a>
+</p>
+
+<h1> The <tt>s6-hiercopy</tt> program </h1>
+
+<p>
+<tt>s6-hiercopy</tt> copies a directory structure recursively.
+</p>
+
+<h2> Interface </h2>
+
+<pre>
+     s6-hiercopy <em>source</em> <em>destination</em>
+</pre>
+
+<ul>
+ <li> <tt>s6-hiercopy</tt> recursively copies <em>source</em> to
+<em>destination</em>, which is created if it doesn't exist.
+The permissions are preserved. The owner and group are preserved
+if the user is the superuser. </li>
+ <li> It exits 0 on success and 111 on temporary failure. </li>
+</ul>
+
+<h2> Notes </h2>
+
+<p>
+ Copying files and browsing through directories is one of Unix's
+weakest points, and <tt>s6-hiercopy</tt> is not meant to work around
+the problem; it's only a quick hack that I needed to boot my embedded
+platform. I originally planned to write the ultimate <tt>cp</tt> utility,
+portable and reliable and featureful and everything - while needing
+approximately a hundred times less resources than GNU <tt>cp</tt> does,
+of course. But I eventually dropped the idea: it's just impossible to
+design, much less write, such a utility.
+</p>
+
+<ul>
+ <li> You can't make it portable because there's no universal standard.
+There is no portable way of creating device special files, for instance.
+So <tt>s6-hiercopy</tt> appears here instead of in
+<a href="http://skarnet.org/software/s6-portable-utils/">s6-portable-utils</a>:
+the platform where I needed that kind of tool is Linux. </li>
+ <li> You can't 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. As a result, <tt>s6-hiercopy</tt>
+is a walking race condition and should <strong>absolutely not</strong>
+be considered instant when used in a multitasking environment.
+But then, <tt>cp -a</tt> shouldn't either. </li>
+</ul>
+
+</body>
+</html>