1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35.
2 .TH CP "1" "March 2007" "GNU coreutils 6.9" "User Commands"
4 cp \- copy files and directories
7 [\fIOPTION\fR]... [\fI-T\fR] \fISOURCE DEST\fR
10 [\fIOPTION\fR]... \fISOURCE\fR... \fIDIRECTORY\fR
13 [\fIOPTION\fR]... \fI-t DIRECTORY SOURCE\fR...
15 .\" Add any additional description here
17 Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
19 Mandatory arguments to long options are mandatory for short options too.
21 \fB\-a\fR, \fB\-\-archive\fR
24 \fB\-\-backup\fR[=\fICONTROL\fR]
25 make a backup of each existing destination file
28 like \fB\-\-backup\fR but does not accept an argument
30 \fB\-\-copy\-contents\fR
31 copy contents of special files when recursive
34 same as \fB\-\-no\-dereference\fR \fB\-\-preserve\fR=\fIlink\fR
36 \fB\-f\fR, \fB\-\-force\fR
37 if an existing destination file cannot be
38 opened, remove it and try again
40 \fB\-i\fR, \fB\-\-interactive\fR
41 prompt before overwrite
44 follow command\-line symbolic links
46 \fB\-l\fR, \fB\-\-link\fR
47 link files instead of copying
49 \fB\-L\fR, \fB\-\-dereference\fR
50 always follow symbolic links
52 \fB\-P\fR, \fB\-\-no\-dereference\fR
53 never follow symbolic links
56 same as \fB\-\-preserve\fR=\fImode\fR,ownership,timestamps
58 \fB\-\-preserve\fR[=\fIATTR_LIST\fR]
59 preserve the specified attributes (default:
60 mode,ownership,timestamps), if possible
61 additional attributes: links, all
63 \fB\-\-no\-preserve\fR=\fIATTR_LIST\fR
64 don't preserve the specified attributes
67 use full source file name under DIRECTORY
69 \fB\-R\fR, \fB\-r\fR, \fB\-\-recursive\fR
70 copy directories recursively
72 \fB\-\-remove\-destination\fR
73 remove each existing destination file before
74 attempting to open it (contrast with \fB\-\-force\fR)
76 \fB\-\-sparse\fR=\fIWHEN\fR
77 control creation of sparse files
79 \fB\-\-strip\-trailing\-slashes\fR
80 remove any trailing slashes from each SOURCE
83 \fB\-s\fR, \fB\-\-symbolic\-link\fR
84 make symbolic links instead of copying
86 \fB\-S\fR, \fB\-\-suffix\fR=\fISUFFIX\fR
87 override the usual backup suffix
89 \fB\-t\fR, \fB\-\-target\-directory\fR=\fIDIRECTORY\fR
90 copy all SOURCE arguments into DIRECTORY
92 \fB\-T\fR, \fB\-\-no\-target\-directory\fR
93 treat DEST as a normal file
95 \fB\-u\fR, \fB\-\-update\fR
96 copy only when the SOURCE file is newer
97 than the destination file or when the
98 destination file is missing
100 \fB\-v\fR, \fB\-\-verbose\fR
101 explain what is being done
103 \fB\-x\fR, \fB\-\-one\-file\-system\fR
104 stay on this file system
107 display this help and exit
110 output version information and exit
112 By default, sparse SOURCE files are detected by a crude heuristic and the
113 corresponding DEST file is made sparse as well. That is the behavior
114 selected by \fB\-\-sparse\fR=\fIauto\fR. Specify \fB\-\-sparse\fR=\fIalways\fR to create a sparse DEST
115 file whenever the SOURCE file contains a long enough sequence of zero bytes.
116 Use \fB\-\-sparse\fR=\fInever\fR to inhibit creation of sparse files.
118 The backup suffix is `~', unless set with \fB\-\-suffix\fR or SIMPLE_BACKUP_SUFFIX.
119 The version control method may be selected via the \fB\-\-backup\fR option or through
120 the VERSION_CONTROL environment variable. Here are the values:
123 never make backups (even if \fB\-\-backup\fR is given)
126 make numbered backups
129 numbered if numbered backups exist, simple otherwise
132 always make simple backups
134 As a special case, cp makes a backup of SOURCE when the force and backup
135 options are given and SOURCE and DEST are the same name for an existing,
138 Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.
140 Report bugs to <bug\-coreutils@gnu.org>.
142 Copyright \(co 2007 Free Software Foundation, Inc.
144 This is free software. You may redistribute copies of it under the terms of
145 the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
146 There is NO WARRANTY, to the extent permitted by law.
148 The full documentation for
150 is maintained as a Texinfo manual. If the
154 programs are properly installed at your site, the command
158 should give you access to the complete manual.