cp

Name

cp -- copy files and directories

Synopsis

Description

The specification for "cp" is as specified in the SUS but with the following differences as listed below.

Differences

-a archive

same as -dpR

--backup[=CONTROL]

make a backup of each existing destination file

-b

like --backup but does not accept an argument

-d, --no-dereference

never follow symbolic links

-H

follow command-line symbolic links

-l, --link

link files instead of copying

-L, --dereference

always follow symbolic links

--parents

append source path to DIRECTORY

--remove-destination

remove each existing destination file before attempting to open it (contrast with --force)

--sparse=WHEN

control creation of spares files.

By default, sparse SOURCE files are detected by a crude heuristic and the corresponding DEST file is made sparse as well. That is the behavior selected by --sparse=auto. Specify --sparse=always to create a sparse DEST file whenever the SOURCE file contains a long enough sequence of zero bytes. Use --sparse=never to inhibit creation of sparse files.

--strip-trailing-slashes

remove any trailing slashes from each SOURCE argument

-s, --symbolic-link

make symbolic links instead of copying

-S, --suffix=SUFFIX

override the usual backup suffix

--target-directory=DIRECTORY

move all SOURCE arguments into DIRECTORY

-u, --update

copy only when the SOURCE file is newer than the destination file or when the destination file is missing

-v, --verbose

explain what is being done

-x, --one-file-system

stay on this file system

--version

output version information and exit