-
Notifications
You must be signed in to change notification settings - Fork 0
/
copyfile.1
72 lines (72 loc) · 1.93 KB
/
copyfile.1
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
.\" Manpage for copyfile
.\" Apple Public Source License
.TH COPYFILE 1 "01 Jan 2024" "inopinatus" "Copyfile User Manual"
.SH NAME
copyfile \- copy file data and/or metadata using copyfile(3)
.SH SYNOPSIS
.B copyfile
.RI src
.RI dst
.RI [ flags... ]
.SH DESCRIPTION
.PP
.B copyfile
is a utility wrapper around the copyfile(3) library built into macOS
for copying file data and metadata.
.PP
The arguments have the same meaning as those passed to the library
function. The
.BI src
and
.BI dst
are paths. The
.BI flags
option accepts a list of space-separated strings matching those of the
library call, and may be any of:
.PP
.I acl stat xattr data security metadata all nofollow_src nofollow_dst
.I nofollow excl move unlink pack unpack check clone clone_force
.I verbose recursive data_sparse run_in_place preserve_dst_tracked
.PP
See copyfile(3) for the documented meaning of these flags.
.PP
Note that only specified contents is copied. If no flags are given,
then no contents will be copied, but the destination may be created
if it does not already exist.
.SH EXAMPLES
Copy a file and its metadata:
.PP
.nf
\fBcopyfile file1.txt file2.txt all\fR
.fi
.PP
Copy only the metadata of one file to another, leaving the
destination's data intact:
.PP
.nf
\fBcopyfile file1.txt file2.txt metadata\fR
.fi
.PP
Attempt to recursively clone a hierarchy, including metadata, with
fallback to a sparse-aware regular copy:
.PP
.nf
\fBcopyfile ~/src ~/tmp/src.backup clone recursive data_sparse\fR
.fi
.SH EXIT STATUS
.PP
The copyfile utility exits with 0 on success, or >0 if an error occurs.
.SH CALLBACKS
.PP
The callback behaviours in the copyfile(3) library are not available
through this utility.
.SH LICENSE
.PP
This version of copyfile is adapted directly from test code included
in Apple OSS releases, and therefore distributed under the Apple
Public Source License.
.SH CONTRIBUTING
.PP
Visit the Github project: https://github.com/inopinatus/copyfile
.SH SEE ALSO
.BR copyfile (3)