-
Notifications
You must be signed in to change notification settings - Fork 0
/
clone.man
105 lines (105 loc) · 2.07 KB
/
clone.man
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
.TH CLONE 1
.SH NAME
clone \- copy files and directories
.SH SYNOPSYS
.B clone
[
.B -guxT
]
[
.B -b
.I blocksize
]
[
.B -p
.I fileprocs:blockprocs
]
.I from ... to
.SH DESCRIPTION
.I Clone
copies files and directories.
Similar in spirit to
.IR fcp (1)
it is a multi-process program which
relies on
.IR pread (2)
and
.IR pwrite (2)
system calls to copy multiple blocks
in parallel, speeding up the file transfer
over high-latency links;
in contrast to
.IR fcp (1)
it can copy both single files and directories,
which may be mixed on the command line.
.PP
A single file is copied as expected. If
.I to
does not exist, it is created; otherwise, an
existing file is overwritten; if
.I to
is a directory,
.I from
is copied into it.
A single directory is copied into
.I to
if it exists; otherwise, a new directory
.I to
is created and the contents of
.I from
are copied into it.
If multiple source files (directories) are given,
they are copied into the
.I to
directory, which is created if neccessary.
.PP
The
.I -x
option sets the mode and modified time of the
destination file (directory) to that of the source
file (directory); the
.I -g
and
.I -u
try to set the group and user id, respectively.
.PP
The
.I -b
option determines the size of a block that
will be transfered by a single block transfer
process (defaults to 128k).
.PP
The
.I -p
option determines the process parallelism
configuration, with
.I fileprocs
being the number of processes that handle
simultaneous file transfers, and
.I blockprocs
being the number of processes that do the
input / output (defaults to 4:16).
.PP
The
.I -T
option disables the default safe-mode behaviour
where a file is fully copied into a temporary file
in the target directory, the target file is removed,
and, finally, the temporary file is renamed.
.PP
.SH SOURCE
.B git://code.a-b.xyz/clone
.SH SEE ALSO
.IR fcp (1),
.IR dircp (1),
.IR pread (2),
.IR pwrite (2)
.PP
Safe-mode has to be disabled with the
.I -T
flag when copying files to Windows drawterm's
.I /mnt/term;
otherwise the Windows file system semantics
prevent
.IR clone (1)
from renaming an already open file.