tty.help
Appearance

Display preferences are saved in this browser.

cpCopy with care

Copy a file to a destination. Recursive options copy directory trees.

Label
Changes files
Edited
2026-11-07
References
1 official

Example

cp ./notes.txt ./notes-backup.txt
  1. cpCommand nameAliases, shell functions, wrappers and PATH can change which program runs.
  2. ./notes.txt ./notes-backup.txtArgumentsFlags and operands as written. Quoting and expansion can change them before the program starts.
Illustrative syntax only. Do not run this without confirming the target and environment.

Things to check

An existing destination may be overwritten. Symlinks, permissions and recursive behavior vary by options and platform.

Before you run it

Check the destination; consider an interactive prompt with -i where supported.

Ask your agent

“Explain the entire command, including every flag and operator. What exact files, services or permissions could it affect, and how will we verify the result?”

Context is part of the command

A command name alone cannot determine safety. Aliases, shell functions, expansions, flags, permissions and working directory can change its behavior.

Explore a full command