Because in Linux, directories don't actually contain files. They contain a list of "addresses" to files. So just directly copying the directory wouldn't copy the files inside.
The -R option tells cp that when it comes across a directory, it should create a new directory in the destination, and start copying files from the subdirectory.
But personally, I think it's really stupid that cp doesn't recursively copy dirs by default, as if that's not what you always need and expect.
Last edited by MTK358; 05-26-2010 at 07:06 AM.
|