Copy Directory In Linux-Recursive Copy In Linux

Copy command can’t create directories or folders, so if you are trying to copy files or directories to destination directories, you must have destination directory before copying.

recursive copy in linux 

Recursive Copy:

Copy command can’t copy the directory into other directories.

recursive folder copy in linux

If you try to copy the files and directories to another directory it will skip the directories but it will copy the files to the destination directory. So if you want to copy directories and files inside that directory to another directory we use recursive copy.

With recursive copy, we can copy files and directories to other directories. but a recursive copy also can’t create a destination directory, only it will copy the files and directories to the destination directory.

for recursive copy, we use cp -r command.


Copying Directory  In Linux:

it will copy the dir1 and its files to the dir2

copying all files and directories to the destination directory

it will copy all files and folders to the destination directory.