cp(1) | General Commands Manual | cp(1) |
cp - Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
cp [-t|--target-directory] [-T|--no-target-directory] [-i|--interactive] [-l|--link] [-n|--no-clobber] [-r|--recursive] [--strip-trailing-slashes] [--debug] [-v|--verbose] [-s|--symbolic-link] [-f|--force] [--remove-destination] [--backup] [-b ] [-S|--suffix] [--update] [-u ] [--reflink] [--attributes-only] [--preserve] [-p|--preserve-default-attributes] [--no-preserve] [--parents] [-P|--no-dereference] [-L|--dereference] [-H ] [-a|--archive] [-d ] [-x|--one-file-system] [--sparse] [--copy-contents] [--context] [-g|--progress] [-h|--help] [-V|--version] [paths]
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
[possible values: none, all, older]
[possible values: auto, always, never]
[possible values: mode, ownership, timestamps, context, link, links, xattr, all]
[possible values: never, auto, always]
Do not copy a non-directory that has an existing destination with the same or newer modification timestamp; instead, silently skip the file without failing. If timestamps are being preserved, the comparison is to the source timestamp truncated to the resolutions of the destination file system and of the system calls used to update timestamps; this avoids duplicate work if several cp -pu commands are executed with the same source and destination. This option is ignored if the -n or --no-clobber option is also specified. Also, if --preserve=links is also specified (like with cp -au for example), that will take precedence; consequently, depending on the order that files are processed from the source, newer files in the destination may be replaced, to mirror hard links in the source. which gives more control over which existing files in the destination are replaced, and its value can be one of the following:
* all This is the default operation when an --update option is not specified, and results in all existing files in the destination being replaced. * none This is similar to the --no-clobber option, in that no files in the destination are replaced, but also skipping a file does not induce a failure. * older This is the default operation when --update is specified, and results in files being replaced if they’re older than the corresponding source file.
The backup suffix is '~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX. The version control method may be selected via the --backup option or through the VERSION_CONTROL environment variable. Here are the values:
none, off never make backups (even if --backup is given)
numbered, t make numbered backups
existing, nil numbered if numbered backups exist, simple otherwise
simple, never always make simple backups
v0.0.24
cp 0.0.24 |