58 words
1 minutes
Linux commands: cp
2022-08-30

Linux commands: cp#

The cp command in Linux is used to copy files and directories.

Basic Usage#

To copy a file, use the following command:

cp source_file destination_file

Copying Directories#

To copy a directory and its contents, use the -r option:

cp -r source_directory destination_directory

Conclusion#

The cp command is a fundamental tool for copying files and directories in Linux. It is essential for file management tasks.


Linux commands: cp
https://zxce3.net/posts/cli/linux-commands-cp/
Author
Memet Zx
Published at
2022-08-30