tar vs cp
Mark Terribile
materribile at yahoo.com
Thu Oct 2 08:35:17 PDT 2003
>> tar handles symbolic links properly, whereas
>> cp will "copy through" the contents of the link.
>
> Also true for cp -R? :-)
> No, but not all systems have "cp -R", although
> FreeBSD does. Likewise for the "-p" or
> "--preserve-permissions" option...
tar requires two executions, one to create the
archive and one to remove it. This has advantages
and disadvantages. cpio -p can do it in one pass,
but requires that you expand the directories with
find or provide a list file. Again, sometimes a
good thing, sometimes not. cpio can also create a
tree of links if you are on the same file system.
Useful for moving large files with minimal disk
activity (remove the original links afterwards).
Mark Terribile
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
More information about the freebsd-questions
mailing list