[plug] imaging HD

James Devenish devenish at cyllene.uwa.edu.au
Fri Jan 3 14:49:43 WST 2003


On Fri, Jan 03, 2003 at 02:34:06PM +0800, Mike Holland wrote:
> > No, a cp command is almost guaranteed to mess up hardlinks and /dev
> > directory. I seem to remember someone advising the use of the tar command
> 
> How? I think thats a bit dated. The gnu version of cp (ie any Linux) works 
> fine.

Yes, most cp (meaning "those supplied with many free and commercial
operating systems and also the GNU versions") have -R these days, though
for historical (and shift-key avoidance) reasons, -r gets used a lot.
Generally, in the case that your cp supports both -r and -R, -r would
try to read from the 'file', while -R would check and replicate links
and devices. -R seems to live up to this promise in some systems I just
tried. I've never personally trusted cp to do the job, but I just
haven't attempted it recently. I'll have an opporunity to try it out
on a whole disk soon, so if it really really works of dismally fails,
I might mention it (unless someone else has some results first).

> Who needs tar on Linux?

It's useful for making ARchives in a format that can be read on other
platforms, and for reading archives that other people have sent you.
When was the last time you were able to use cp to e-mail symbolic links
to someone, or transport ACLs with zip ;-P




More information about the plug mailing list