~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to man/cp.1

  • Committer: Colin Watson
  • Date: 2013-10-30 15:48:33 UTC
  • mfrom: (8.3.5 sid)
  • Revision ID: cjwatson@canonical.com-20131030154833-xdt6e1yfffqom1c4
merge from Debian 8.21-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.35.
2
 
.TH CP "1" "October 2012" "GNU coreutils 8.20" "User Commands"
3
 
.SH NAME
4
 
cp \- copy files and directories
5
 
.SH SYNOPSIS
6
 
.B cp
7
 
[\fIOPTION\fR]... [\fI-T\fR] \fISOURCE DEST\fR
8
 
.br
9
 
.B cp
10
 
[\fIOPTION\fR]... \fISOURCE\fR... \fIDIRECTORY\fR
11
 
.br
12
 
.B cp
13
 
[\fIOPTION\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=\fIall\fR
23
 
.TP
24
 
\fB\-\-attributes\-only\fR
25
 
don't copy the file data, just the attributes
26
 
.TP
27
 
\fB\-\-backup\fR[=\fICONTROL\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=\fIlinks\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 (redundant if
42
 
the \fB\-n\fR option is 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=\fImode\fR,ownership,timestamps
66
 
.TP
67
 
\fB\-\-preserve\fR[=\fIATTR_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=\fIATTR_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[=\fIWHEN\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=\fIWHEN\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=\fISUFFIX\fR
100
 
override the usual backup suffix
101
 
.TP
102
 
\fB\-t\fR, \fB\-\-target\-directory\fR=\fIDIRECTORY\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\-\-help\fR
120
 
display this help and exit
121
 
.TP
122
 
\fB\-\-version\fR
123
 
output version information and exit
124
 
.PP
125
 
By default, sparse SOURCE files are detected by a crude heuristic and the
126
 
corresponding DEST file is made sparse as well.  That is the behavior
127
 
selected by \fB\-\-sparse\fR=\fIauto\fR.  Specify \fB\-\-sparse\fR=\fIalways\fR to create a sparse DEST
128
 
file whenever the SOURCE file contains a long enough sequence of zero bytes.
129
 
Use \fB\-\-sparse\fR=\fInever\fR to inhibit creation of sparse files.
130
 
.PP
131
 
When \fB\-\-reflink\fR[=\fIalways\fR] is specified, perform a lightweight copy, where the
132
 
data blocks are copied only when modified.  If this is not possible the copy
133
 
fails, or if \fB\-\-reflink\fR=\fIauto\fR is specified, fall back to a standard copy.
134
 
.PP
135
 
The backup suffix is '~', unless set with \fB\-\-suffix\fR or SIMPLE_BACKUP_SUFFIX.
136
 
The version control method may be selected via the \fB\-\-backup\fR option or through
137
 
the VERSION_CONTROL environment variable.  Here are the values:
138
 
.TP
139
 
none, off
140
 
never make backups (even if \fB\-\-backup\fR is given)
141
 
.TP
142
 
numbered, t
143
 
make numbered backups
144
 
.TP
145
 
existing, nil
146
 
numbered if numbered backups exist, simple otherwise
147
 
.TP
148
 
simple, never
149
 
always make simple backups
150
 
.PP
151
 
As a special case, cp makes a backup of SOURCE when the force and backup
152
 
options are given and SOURCE and DEST are the same name for an existing,
153
 
regular file.
154
 
.SH AUTHOR
155
 
Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.
156
 
.SH "REPORTING BUGS"
157
 
Report cp bugs to bug\-coreutils@gnu.org
158
 
.br
159
 
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
160
 
.br
161
 
General help using GNU software: <http://www.gnu.org/gethelp/>
162
 
.br
163
 
Report cp translation bugs to <http://translationproject.org/team/>
164
 
.SH COPYRIGHT
165
 
Copyright \(co 2012 Free Software Foundation, Inc.
166
 
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
167
 
.br
168
 
This is free software: you are free to change and redistribute it.
169
 
There is NO WARRANTY, to the extent permitted by law.
170
 
.SH "SEE ALSO"
171
 
The full documentation for
172
 
.B cp
173
 
is maintained as a Texinfo manual.  If the
174
 
.B info
175
 
and
176
 
.B cp
177
 
programs are properly installed at your site, the command
178
 
.IP
179
 
.B info coreutils \(aqcp invocation\(aq
180
 
.PP
181
 
should give you access to the complete manual.