cp
cp is a shell command for copying files and directories.[1]
- GNU Coreutils [EN] @ Fedora Package
- GNU Coreutils [EN] @ Homebrew Formula
Documentation
- cp [EN] @ GNU Coreutils Manual
Syntax
cp [PARAMETER ...] SRC DST
cp [PARAMETER ...] SRC [...] DIR
Parameters
- General
- The following parameters can be used with all version of cp:
- NOTE:The BSD version only supports the short form (e.g. -f) of these parameters!
- -f, --force
- If an existing destination file cannot be opened, remove it and try again.
- -l, --link
- Hard link files instead of copying.
- -P, --no-dereference
- Never follow symbolic links in SRC.
- -r, -R, --recursive
- Copy directories recursively.
- -s, --symbolic-link
- Make symbolic links instead of copying.
References
- ↑ Wikipedia contributors. "cp (Unix)." Wikipedia. https://en.wikipedia.org/wiki/Cp_(Unix) (accessed 18.08.2025)