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

Re: dd



 Hi.

On Mon, 11 Aug 2014 00:48:29 -0400
Ethan Rosenberg <erosenberg@hygeiabiomedical.com> wrote:

> Dear List -
> 
> I am having trouble w/ dd.  I am sure that it is probably a stupid mistake.

You've made four mistakes indeed.
 
> root@meow:/var# dd  if=/var/www of=/dev/sdb1/ bs=2048
> dd: failed to open ‘/dev/sdb1/’: Is a directory

You're doing it wrong - /dev/sdb1/ implies /dev/sdb1 is a directory,
and it's a block device.

> root@meow:/var# dd  if=/var/www of=/dev/sdb/ bs=2048
> dd: failed to open ‘/dev/sdb/’: Is a directory

Same thing.

> root@meow:/var# dd  if=/var/www of=/media/lin50/ bs=2048
> dd: failed to open ‘/media/lin50/’: Is a directory

While dd can be used to copy a directory, it cannot be used alone for
this task. Try this:

(cd /var/www; tar cf - *) | (cd /media/lin50; tar xf -)

Or, just:

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

Reco


Reply to: