←  linux commands

Views:

cp command

The cp command is used to copy file(s) from one location to another.

Syntax: cp [options] source destination

Example:

cp folder1/config.txt folder2/
cp-output

Options:

-r To copy directory and its content recursively

Example

cp -r folder1/data folder2/
cp-recursive-output
-i To ask before overwriting

Example

cp -i folder1/* folder2/
cp-interactive-output