Web/ Design/ Vista

Resources for Designers & Developer

Copy Entire Folder, Subfolder and Files in Linux

Sometimes you may need to copy an entire folder with subfolder and files inside to another folder. Use the following command:

cp -r /soure/folder/* /destination/folder

“-r” flag will recursively copy the subfolders and files.
“*” is used to indicate everything inside the source folder.

Note that you do not need an ending slash after the destination folder name. Also the destination folder must exist (or you need to create it) before copying.