The cp command
Copy files and directories. Copies SOURCE to DEST. If the last name is an existing directory, the copies go inside it and keep their names. Copying a directory needs -r. An existing file at DEST is overwritten without asking.
A practice shell in your browser that behaves like bash on Linux for these commands. Nothing you type leaves the page.
Usage
cp [OPTION]... SOURCE DEST cp [OPTION]... SOURCE... DIRECTORY
Options
| -r, -R, --recursive | copy directories and everything in them |
|---|---|
| -v, --verbose | say what was copied |
Examples
cp report.txt report-backup.txtA copy with a new namecp *.jpg photos/Copy several files into a foldercp -r website website-oldCopy a whole folder