February 2001
Beginner to intermediate
448 pages
9h 2m
English
Official Description
Copies files.
Syntax
cp [-fipr] [--] source destination
Options (not a complete list)
-f does not prompt you when an existing file is to be overwritten (not available in all UNIX variants).
-i prompts you with the name of the file whenever the copy would cause an existing file to be overwritten.
-p preserves metadata (permissions, ownership, dates, and so on).
-r, when the source is a directory, copies the directory and the entire subtree connected at that point.
Oddities
Do not give the destination the same name as one of the source files.
If you specify a directory as the destination, the directory must already exist.
Example
$ ls -l buzz4
-rwxrwxr-- 1 obrien obrien 165 Nov 26 14:08 buzz4 # Note date and time $ $ ...Read now
Unlock full access