Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

cp

Copy files and directories

Syntax

cp [OPTION]... SOURCE DEST

Common Options

-rRecursive copy
-vVerbose output
-iPrompt before overwrite
-pPreserve attributes
-uUpdate only newer files

Common Examples

cp file.txt backup/

Copy file

cp -r dir1/ dir2/

Copy directory recursively

cp -p file.txt backup/

Preserve attributes

Related Commands

Related Tools

More Code & Dev Tools