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.
Category: Linux Tutorials




