What is the different between "dd" and "cp"

What is the different between "dd" and "cp"

Post by Tay Wee W » Wed, 17 Oct 2001 16:08:13



Can anyone tell me what is the different between command 'dd' and
'cp'. why is it the if we are copy something from a device, we use the
command "dd if=device of=file". However "cp device file" does not
work?
 
 
 

What is the different between "dd" and "cp"

Post by Gary L. Burnor » Wed, 17 Oct 2001 16:50:57



[snip]

http://www.veryComputer.com/
#
#    Santa Clara Police Department
#    In the case of: Sex Offender Gary Burnore
#
#    Gary Burnore's * * of minor Rachel
#    occurred in Santa Clara, CA.

 
 
 

What is the different between "dd" and "cp"

Post by Griff Mille » Wed, 17 Oct 2001 23:18:47



> Can anyone tell me what is the different between command 'dd' and
> 'cp'. why is it the if we are copy something from a device, we use the
> command "dd if=device of=file". However "cp device file" does not
> work?

Roughly speaking, they work at different levels. cp expects to work on
files and directories in a (usually ufs) filesystem. dd typically works
at a lower level, on devices. Of course there's some overlap; dd can
read and write to files in a filesystem. But I can't think of an instance
right now where cp could directly access a device.

Another way of thinking of it would be: dd is more general-purpose, but less
user-friendly. cp is less general-purpose, but more user-friendly.

In Unix, everything is a file, yes, but only in a certain context. In the
context of cp, the word "file" is a bit more restrictive in its meaning.

Hope this helps.

--
Griff Miller II                   |                                           |
Manager of Information Technology | "This space has been blankly              |
Positron Corporation              |  left intentional."                       |