[plug] tar vs cp -r

Cameron Patrick cameron at patrick.wattle.id.au
Thu Mar 10 15:38:48 WST 2005


Jim Householder wrote:

> On a number of occasions I have seen a preference shown for using tar to 
> move large trees rather than cp -r.
> 
> What is the advantage of tar?  Properties and links handling perhaps?

Not all unix-ish systems have 'cp -r'.  And tar may well do a better
job of preserving permissions and ownership and other special cases
than cp -r, although I note that GNU cp has a -a flag which copies
everything exactly (or close to it).

Cameron.




More information about the plug mailing list