Linux Copy a Folder to Other Directory: A Step Guide – Linux Tutorial

By | June 2, 2022

In this tutorial, we will introduce how to copy a directory to other directory in linux. We will use cp command to implement it.

How to copy a folder to other directory in linux?

We can use command below:

cp -r source_directory dest_directory

Use this command, we can copy all files in source_directory to dest_directory including source_directory.

Here is an example:

cp -r /home/test/ /home/nlp/

Then, we will find a test folder in /home/nlp/