$ cp -r src dest
$ cp -p a.txt b.txt
| -r | copy directories recursively |
| -R | copy directories recursively |
| -f | force — overwrite the destination if needed |
| -i | prompt before overwriting |
| -p | preserve mode, ownership and timestamps |
| -v | verbose — print each file as it is copied |
| -a | archive — recursive plus preserve everything |
| -u | copy only when the source is newer than the destination |
Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.