shithub: clone

Download patch

ref: d7c17b1fb34c86c450a7f64cdc751b169f6f6c7d
parent: b5bcf2e7a3676b4dac35d73604d1ded5fba7ab5c
author: kvik <kvik@a-b.xyz>
date: Tue Nov 6 18:17:32 EST 2018

readme

--- /dev/null
+++ b/README
@@ -1,0 +1,60 @@
+
+
+     CLONE(1)                                                 CLONE(1)
+
+     NAME
+          clone - copy files and directories
+
+     SYNOPSYS
+          clone [ -gux ] [ -b blocksize ] [ -p fileprocs:blockprocs ]
+          from ... to
+
+     DESCRIPTION
+          Clone copies files and directories.  Similar in spirit to
+          fcp(1) it is a multi-process program which relies on
+          pread(2) and pwrite(2) system calls to copy multiple blocks
+          in parallel, speeding up the file transfer over high-latency
+          links; in contrast to fcp(1) it can copy both single files
+          and directories, which may be mixed on the command line.
+
+          A single file is copied as expected. If to does not exist,
+          it is created; otherwise, an existing file is overwritten;
+          if to is a directory, from is copied into it.  A single
+          directory is copied into to if it exists; otherwise, a new
+          directory to is created and the contents of from are copied
+          into it.  If multiple source files (directories) are given,
+          they are copied into the to directory, which is created if
+          neccessary.
+
+          The -x option sets the mode and modified time of the desti-
+          nation file (directory) to that of the source file (direc-
+          tory); the -g and -u try to set the group and user id,
+          respectively.
+
+          The -b option determines the size of a block that will be
+          transfered by a single block transfer process (defaults to
+          128k).
+
+          The -p option determines the process parallelism configura-
+          tion, with fileprocs being the number of processes that han-
+          dle simultaneous file transfers, and blockprocs being the
+          number of processes that do the input / output (defaults to
+          4:16).
+
+     SOURCE
+          https://bitbucket.org/k-vik/clone
+
+     SEE ALSO
+          fcp(1), dircp(1), pread(2), pwrite(2)
+
+     BUGS
+          Preserving the modification time of directories does not
+          work. Attributes are cloned at directory creation time;
+          meaning, if there's files to be copied in this directory,
+          this will update the parent modification time. Furthermore,
+
+     CLONE(1)                                                 CLONE(1)
+
+          all directories get the forced write permission, since not
+          having one would mean no new file creation.
+
--- a/mkfile
+++ b/mkfile
@@ -6,6 +6,9 @@
 
 </sys/src/cmd/mkone
 
+README:
+	troff -man -N clone.man1 | ssam 'x/\n\n\n+/c/\n\n/' >README
+
 install:V:
 	cp clone.man1 /sys/man/1/clone