OSDN Git Service

Update translations: chroot, csplit, dd, du, pwd
[linuxjm/coreutils.git] / original / man1 / cp.1
1 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.3.
2 .TH CP "1" "January 2016" "GNU coreutils 8.25" "User Commands"
3 .SH NAME
4 cp \- copy files and directories
5 .SH SYNOPSIS
6 .B cp
7 [\fI\,OPTION\/\fR]... [\fI\,-T\/\fR] \fI\,SOURCE DEST\/\fR
8 .br
9 .B cp
10 [\fI\,OPTION\/\fR]... \fI\,SOURCE\/\fR... \fI\,DIRECTORY\/\fR
11 .br
12 .B cp
13 [\fI\,OPTION\/\fR]... \fI\,-t DIRECTORY SOURCE\/\fR...
14 .SH DESCRIPTION
15 .\" Add any additional description here
16 .PP
17 Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
18 .PP
19 Mandatory arguments to long options are mandatory for short options too.
20 .TP
21 \fB\-a\fR, \fB\-\-archive\fR
22 same as \fB\-dR\fR \fB\-\-preserve\fR=\fI\,all\/\fR
23 .TP
24 \fB\-\-attributes\-only\fR
25 don't copy the file data, just the attributes
26 .TP
27 \fB\-\-backup\fR[=\fI\,CONTROL\/\fR]
28 make a backup of each existing destination file
29 .TP
30 \fB\-b\fR
31 like \fB\-\-backup\fR but does not accept an argument
32 .TP
33 \fB\-\-copy\-contents\fR
34 copy contents of special files when recursive
35 .TP
36 \fB\-d\fR
37 same as \fB\-\-no\-dereference\fR \fB\-\-preserve\fR=\fI\,links\/\fR
38 .TP
39 \fB\-f\fR, \fB\-\-force\fR
40 if an existing destination file cannot be
41 opened, remove it and try again (this option
42 is ignored when the \fB\-n\fR option is also used)
43 .TP
44 \fB\-i\fR, \fB\-\-interactive\fR
45 prompt before overwrite (overrides a previous \fB\-n\fR
46 option)
47 .TP
48 \fB\-H\fR
49 follow command\-line symbolic links in SOURCE
50 .TP
51 \fB\-l\fR, \fB\-\-link\fR
52 hard link files instead of copying
53 .TP
54 \fB\-L\fR, \fB\-\-dereference\fR
55 always follow symbolic links in SOURCE
56 .TP
57 \fB\-n\fR, \fB\-\-no\-clobber\fR
58 do not overwrite an existing file (overrides
59 a previous \fB\-i\fR option)
60 .TP
61 \fB\-P\fR, \fB\-\-no\-dereference\fR
62 never follow symbolic links in SOURCE
63 .TP
64 \fB\-p\fR
65 same as \fB\-\-preserve\fR=\fI\,mode\/\fR,ownership,timestamps
66 .TP
67 \fB\-\-preserve\fR[=\fI\,ATTR_LIST\/\fR]
68 preserve the specified attributes (default:
69 mode,ownership,timestamps), if possible
70 additional attributes: context, links, xattr,
71 all
72 .TP
73 \fB\-\-no\-preserve\fR=\fI\,ATTR_LIST\/\fR
74 don't preserve the specified attributes
75 .TP
76 \fB\-\-parents\fR
77 use full source file name under DIRECTORY
78 .TP
79 \fB\-R\fR, \fB\-r\fR, \fB\-\-recursive\fR
80 copy directories recursively
81 .TP
82 \fB\-\-reflink\fR[=\fI\,WHEN\/\fR]
83 control clone/CoW copies. See below
84 .TP
85 \fB\-\-remove\-destination\fR
86 remove each existing destination file before
87 attempting to open it (contrast with \fB\-\-force\fR)
88 .TP
89 \fB\-\-sparse\fR=\fI\,WHEN\/\fR
90 control creation of sparse files. See below
91 .TP
92 \fB\-\-strip\-trailing\-slashes\fR
93 remove any trailing slashes from each SOURCE
94 argument
95 .TP
96 \fB\-s\fR, \fB\-\-symbolic\-link\fR
97 make symbolic links instead of copying
98 .TP
99 \fB\-S\fR, \fB\-\-suffix\fR=\fI\,SUFFIX\/\fR
100 override the usual backup suffix
101 .TP
102 \fB\-t\fR, \fB\-\-target\-directory\fR=\fI\,DIRECTORY\/\fR
103 copy all SOURCE arguments into DIRECTORY
104 .TP
105 \fB\-T\fR, \fB\-\-no\-target\-directory\fR
106 treat DEST as a normal file
107 .TP
108 \fB\-u\fR, \fB\-\-update\fR
109 copy only when the SOURCE file is newer
110 than the destination file or when the
111 destination file is missing
112 .TP
113 \fB\-v\fR, \fB\-\-verbose\fR
114 explain what is being done
115 .TP
116 \fB\-x\fR, \fB\-\-one\-file\-system\fR
117 stay on this file system
118 .TP
119 \fB\-Z\fR
120 set SELinux security context of destination
121 file to default type
122 .TP
123 \fB\-\-context\fR[=\fI\,CTX\/\fR]
124 like \fB\-Z\fR, or if CTX is specified then set the
125 SELinux or SMACK security context to CTX
126 .TP
127 \fB\-\-help\fR
128 display this help and exit
129 .TP
130 \fB\-\-version\fR
131 output version information and exit
132 .PP
133 By default, sparse SOURCE files are detected by a crude heuristic and the
134 corresponding DEST file is made sparse as well.  That is the behavior
135 selected by \fB\-\-sparse\fR=\fI\,auto\/\fR.  Specify \fB\-\-sparse\fR=\fI\,always\/\fR to create a sparse DEST
136 file whenever the SOURCE file contains a long enough sequence of zero bytes.
137 Use \fB\-\-sparse\fR=\fI\,never\/\fR to inhibit creation of sparse files.
138 .PP
139 When \fB\-\-reflink\fR[=\fI\,always\/\fR] is specified, perform a lightweight copy, where the
140 data blocks are copied only when modified.  If this is not possible the copy
141 fails, or if \fB\-\-reflink\fR=\fI\,auto\/\fR is specified, fall back to a standard copy.
142 .PP
143 The backup suffix is '~', unless set with \fB\-\-suffix\fR or SIMPLE_BACKUP_SUFFIX.
144 The version control method may be selected via the \fB\-\-backup\fR option or through
145 the VERSION_CONTROL environment variable.  Here are the values:
146 .TP
147 none, off
148 never make backups (even if \fB\-\-backup\fR is given)
149 .TP
150 numbered, t
151 make numbered backups
152 .TP
153 existing, nil
154 numbered if numbered backups exist, simple otherwise
155 .TP
156 simple, never
157 always make simple backups
158 .PP
159 As a special case, cp makes a backup of SOURCE when the force and backup
160 options are given and SOURCE and DEST are the same name for an existing,
161 regular file.
162 .SH AUTHOR
163 Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.
164 .SH "REPORTING BUGS"
165 GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
166 .br
167 Report cp translation bugs to <http://translationproject.org/team/>
168 .SH COPYRIGHT
169 Copyright \(co 2016 Free Software Foundation, Inc.
170 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
171 .br
172 This is free software: you are free to change and redistribute it.
173 There is NO WARRANTY, to the extent permitted by law.
174 .SH "SEE ALSO"
175 Full documentation at: <http://www.gnu.org/software/coreutils/cp>
176 .br
177 or available locally via: info \(aq(coreutils) cp invocation\(aq