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

Re: Putting It All On a Stick



Hallo,
* Thomas Schmidt [Thu, Dec 31 2015, 06:11:39PM]:
> Hi,
> 
> Steve Matzura wrote:
> > The one thing I forgot is cp and dd are not the same.
> 
> I was surprised that cp onto block devices really works as
> needed for this purpose.
> You could also do
>   cat debian-8.2.0-amd64-BD-1.iso >/dev/sdc
> 
> But for old unixers no other tool than dd comes to the mind.

It's like duck typing: if it has syscalls like cp and uses them like cp
then it must be cp... at least something like that.

In the end, dd gives you more control (buffer sizes, IO synchronization
behavior for data/metadata) and it can print the status with SIGUSR1.

But for regular "push data around from FD to FD" job the only crucial
difference I remember is the nasty behavior of dd when a short read
occurres - aborting instead of retrying as cp does. Not sure whether
they changed the default mode to blocking mode nowadays.


Regards,
Eduard.

-- 
<towo> Du solltest wissen: Du bist hier im Internet. Da wird jede Deiner
	Aussagen so verdreht, dass man Dich in Grund und Boden flamen kann.


Reply to: