CP(1)

NAME
cp, cpdir - file copy

SYNOPSIS
cp [-pifsmrRvx] file1 file2
cp [-pifsrRvx] file ... directory
cpdir [-ifvx] file1 file2

OPTIONS

EXAMPLES

DESCRIPTION

Cp copies one file to another, or copies one or more files to a directory. Special files are normally opened and read, unless -r is used. -r also copies the link structure, something -R doesn't care about. The -s option differs from -p that it only copies the times if the target file already exists. A normal copy only copies the mode of the file, with the file creation mask applied. Set-uid bits are cleared if the owner cannot be set. (The -s flag does not patronize you by clearing bits. Alas -s and -r are nonstandard.)

Cpdir is a convenient synonym for cp -psmr to make a precise copy of a directory tree.

SEE ALSO
cat(1), mkdir(1), rmdir(1), ln(1), rm(1).