shithub: clone

ref: 60568e2476de3fc5117c0d00bc6ad682ecbbc135
dir: /README/

View raw version


     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,
          all directories get the forced write permission, since not
          having one would mean no new file creation.