Easy Tutorial
❮ Linux Comm Makedev Linux Comm Mkfs Msdos ❯

Linux cp Command

Linux Command Manual

The Linux cp (short for "copy file") command is primarily used to copy files or directories.

Syntax

cp [options] source dest

or

cp [options] source... directory

Parameter Description:

Example

Use the cp command to copy all files in the current directory test/ to the new directory newtest/. Enter the following command:

$ cp -r test/ newtest

Note: When using this command to copy directories, the parameter -r or -R must be used.

Linux Command Manual

❮ Linux Comm Makedev Linux Comm Mkfs Msdos ❯