cp

abbr.candle-power luminous intensity

Linux cp command syntax

Function: cp command is mainly used to copy files or directories.

Syntax: cp [options] source dest or cp [options] source... directory

Linux cp command example

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

$ cp –r test/ newtest

Note: When users use this command to copy a directory, they must Use parameter "-r" or "-R".