Tizen 2.0 Release
[external/tizen-coreutils.git] / man / cp.1
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"
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\-dpPR\fR
23 .TP
24 \fB\-\-backup\fR[=\fICONTROL\fR]
25 make a backup of each existing destination file
26 .TP
27 \fB\-b\fR
28 like \fB\-\-backup\fR but does not accept an argument
29 .TP
30 \fB\-\-copy\-contents\fR
31 copy contents of special files when recursive
32 .TP
33 \fB\-d\fR
34 same as \fB\-\-no\-dereference\fR \fB\-\-preserve\fR=\fIlink\fR
35 .TP
36 \fB\-f\fR, \fB\-\-force\fR
37 if an existing destination file cannot be
38 opened, remove it and try again
39 .TP
40 \fB\-i\fR, \fB\-\-interactive\fR
41 prompt before overwrite
42 .TP
43 \fB\-H\fR
44 follow command\-line symbolic links
45 .TP
46 \fB\-l\fR, \fB\-\-link\fR
47 link files instead of copying
48 .TP
49 \fB\-L\fR, \fB\-\-dereference\fR
50 always follow symbolic links
51 .TP
52 \fB\-P\fR, \fB\-\-no\-dereference\fR
53 never follow symbolic links
54 .TP
55 \fB\-p\fR
56 same as \fB\-\-preserve\fR=\fImode\fR,ownership,timestamps
57 .TP
58 \fB\-\-preserve\fR[=\fIATTR_LIST\fR]
59 preserve the specified attributes (default:
60 mode,ownership,timestamps), if possible
61 additional attributes: links, all
62 .TP
63 \fB\-\-no\-preserve\fR=\fIATTR_LIST\fR
64 don't preserve the specified attributes
65 .TP
66 \fB\-\-parents\fR
67 use full source file name under DIRECTORY
68 .TP
69 \fB\-R\fR, \fB\-r\fR, \fB\-\-recursive\fR
70 copy directories recursively
71 .TP
72 \fB\-\-remove\-destination\fR
73 remove each existing destination file before
74 attempting to open it (contrast with \fB\-\-force\fR)
75 .TP
76 \fB\-\-sparse\fR=\fIWHEN\fR
77 control creation of sparse files
78 .TP
79 \fB\-\-strip\-trailing\-slashes\fR
80 remove any trailing slashes from each SOURCE
81 argument
82 .TP
83 \fB\-s\fR, \fB\-\-symbolic\-link\fR
84 make symbolic links instead of copying
85 .TP
86 \fB\-S\fR, \fB\-\-suffix\fR=\fISUFFIX\fR
87 override the usual backup suffix
88 .TP
89 \fB\-t\fR, \fB\-\-target\-directory\fR=\fIDIRECTORY\fR
90 copy all SOURCE arguments into DIRECTORY
91 .TP
92 \fB\-T\fR, \fB\-\-no\-target\-directory\fR
93 treat DEST as a normal file
94 .TP
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
99 .TP
100 \fB\-v\fR, \fB\-\-verbose\fR
101 explain what is being done
102 .TP
103 \fB\-x\fR, \fB\-\-one\-file\-system\fR
104 stay on this file system
105 .TP
106 \fB\-\-help\fR
107 display this help and exit
108 .TP
109 \fB\-\-version\fR
110 output version information and exit
111 .PP
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.
117 .PP
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:
121 .TP
122 none, off
123 never make backups (even if \fB\-\-backup\fR is given)
124 .TP
125 numbered, t
126 make numbered backups
127 .TP
128 existing, nil
129 numbered if numbered backups exist, simple otherwise
130 .TP
131 simple, never
132 always make simple backups
133 .PP
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,
136 regular file.
137 .SH AUTHOR
138 Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.
139 .SH "REPORTING BUGS"
140 Report bugs to <bug\-coreutils@gnu.org>.
141 .SH COPYRIGHT
142 Copyright \(co 2007 Free Software Foundation, Inc.
143 .br
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.
147 .SH "SEE ALSO"
148 The full documentation for
149 .B cp
150 is maintained as a Texinfo manual.  If the
151 .B info
152 and
153 .B cp
154 programs are properly installed at your site, the command
155 .IP
156 .B info cp
157 .PP
158 should give you access to the complete manual.