Skip to content
masterclass Buddy

Linux & Shell · Command

cp

cp copies files and directories. Options control recursion, metadata preservation, symbolic links, backups, and overwriting.

Last updated

Syntax

cp [ OPTION ]... [ -T ] SOURCE DEST
cp [ OPTION ]... SOURCE ... DIRECTORY
cp [ OPTION ]... -t DIRECTORY SOURCE ...

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • install(1)
  • --preserve
  • --recursive
  • --no-dereference
  • --reflink
  • --backup

Source: cp(1) - Linux manual page. Checked 2026-11-03.