
cp | 93
Linux
Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
-r If any of the specified files is a directory, compress recursively.
-v Print compression statistics.
-V Print version and compilation information and then exit.
cp
cp [options] file1 file2
cp [options] files directory
Copy file1 to file2, or copy one or more files to the same names
under directory. If the destination is an existing file, the file is over-
written; if the destination is an existing directory, the file is copied
into the directory (the directory is not overwritten).
Options
-a, --archive
Preserve attributes of original files where possible. The same
as -dpr.
-b, --backup
Back up files that would otherwise be overwritten.
-d, --no-dereference
Do not dereference symbolic links; preserve hard-link relation-
ships between source and copy.
-f, --force
Remove existing files in the destination.
-i, --interactive
Prompt before overwriting destination files. On most systems,
this flag is turned off by default except for the root user, who
is normally prompted before overwriting files.
-l, --link
Make hard links, not copies, of nondirectories.
-p, --preserve
Preserve all information, including owner, group, permis-
sions, and timestamps.
-P, --parents
Preserve intermediate directories in source. The last argument
must be the name of an existing directory. For example, the ...