1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022.
2 .TH CP "1" "October 2003" "cp (coreutils) 5.0" FSF
4 cp \- copy files and directories
7 [\fIOPTION\fR]... \fISOURCE DEST\fR
10 [\fIOPTION\fR]... \fISOURCE\fR... \fIDIRECTORY\fR
13 [\fIOPTION\fR]... \fI--target-directory=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\-\-no\-dereference\fR
37 never follow symbolic links
39 \fB\-f\fR, \fB\-\-force\fR
40 if an existing destination file cannot be
41 opened, remove it and try again
43 \fB\-i\fR, \fB\-\-interactive\fR
44 prompt before overwrite
47 follow command-line symbolic links
49 \fB\-l\fR, \fB\-\-link\fR
50 link files instead of copying
52 \fB\-L\fR, \fB\-\-dereference\fR
53 always 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 append source path to DIRECTORY
70 same as `--no-dereference'
72 \fB\-R\fR, \fB\-r\fR, \fB\-\-recursive\fR
73 copy directories recursively
75 \fB\-\-remove\-destination\fR
76 remove each existing destination file before
77 attempting to open it (contrast with \fB\-\-force\fR)
79 \fB\-\-reply=\fR{yes,no,query}
80 specify how to handle the prompt about an
81 existing destination file
83 \fB\-\-sparse\fR=\fIWHEN\fR
84 control creation of sparse files
86 \fB\-\-strip\-trailing\-slashes\fR remove any trailing slashes from each SOURCE
89 \fB\-s\fR, \fB\-\-symbolic\-link\fR
90 make symbolic links instead of copying
92 \fB\-S\fR, \fB\-\-suffix\fR=\fISUFFIX\fR
93 override the usual backup suffix
95 \fB\-\-target\-directory\fR=\fIDIRECTORY\fR
96 move all SOURCE arguments into DIRECTORY
98 \fB\-u\fR, \fB\-\-update\fR
99 copy only when the SOURCE file is newer
100 than the destination file or when the
101 destination file is missing
103 \fB\-v\fR, \fB\-\-verbose\fR
104 explain what is being done
106 \fB\-x\fR, \fB\-\-one\-file\-system\fR
107 stay on this file system
110 display this help and exit
113 output version information and exit
115 By default, sparse SOURCE files are detected by a crude heuristic and the
116 corresponding DEST file is made sparse as well. That is the behavior
117 selected by \fB\-\-sparse\fR=\fIauto\fR. Specify \fB\-\-sparse\fR=\fIalways\fR to create a sparse DEST
118 file whenever the SOURCE file contains a long enough sequence of zero bytes.
119 Use \fB\-\-sparse\fR=\fInever\fR to inhibit creation of sparse files.
121 The backup suffix is `~', unless set with \fB\-\-suffix\fR or SIMPLE_BACKUP_SUFFIX.
122 The version control method may be selected via the \fB\-\-backup\fR option or through
123 the VERSION_CONTROL environment variable. Here are the values:
126 never make backups (even if \fB\-\-backup\fR is given)
129 make numbered backups
132 numbered if numbered backups exist, simple otherwise
135 always make simple backups
137 As a special case, cp makes a backup of SOURCE when the force and backup
138 options are given and SOURCE and DEST are the same name for an existing,
141 Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.
143 Report bugs to <bug-coreutils@gnu.org>.
145 Copyright \(co 2003 Free Software Foundation, Inc.
147 This is free software; see the source for copying conditions. There is NO
148 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
150 The full documentation for
152 is maintained as a Texinfo manual. If the
156 programs are properly installed at your site, the command
160 should give you access to the complete manual.