[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dd



On 11/08/2014 12:16, Stephen Powell wrote:
On Mon, 11 Aug 2014 01:15:31 -0400 (EDT), Reco wrote:
While dd can be used to copy a directory, it cannot be used alone for
this task. Try this:

...

cp -a /var/www/* /media/lin50
This may work if there are no "hidden" files in the directory (files whose
names begin with a period), and if there are no files with embedded blanks
in their names, etc.  But as a more general approach, I suggest

    cp -a /var/www/. /media/lin50

The above handles all of the aforementioned special cases.  This copies
the entire directory tree below /var/www, including subdirectories, which
I assume is the OP's intent.

pax will do the job, but you will need to install it:

cd /var/www
pax -rw . /media/lin50

--
Martin


Reply to: