How to copy an entire folder in Linux

Article published Saturday, June 4th, 2011 at 7:48 pm

I keep having to search for this command… This will recursively copy an entire directory in Linux from one location to another (similar to if you were to drag and drop the file using a GUI).

cp -R path/to/existing/ path/to/new/


Note the -R flag to recursively copy. This will fix the “ignoring directory” error you get when using the copy function without the flag present.

Hi, I’m Tom, and Renowned Media is my professional blog for web development tutorials. Traditionally, I’m a PHP/MySQL developer, but recently I’ve done a lot of JavaScript and Backbone.js development. Right now I’m really interested in Node.js and NoSQL technologies. I love developing on a mac and deploying apps to Linux servers.

Facebook Twitter LinkedIn Google+ 

Tags: ,

Category: Linux Tutorials

Leave a Reply