Re: tar, cpio, or cp?
> Does anyone know the best way to copy a huge directory tree (~1Gig)
> to another disk (mounted at some point)? I need to preserve the
> ownerships and permissions, preservation of times are optional.
>
> I am aware of 3 ways:
> tar cpfl - dir1 | tar -C dir2 -xpf -
> find dir1 -xdev -print | cpio -p -admu dir2
> cp -ax dir1 dir2
>
> Which one is considered to be safer, faster, etc?
>
A technique that I use on a regular basis to copy from one partition
to another is the following:
...say i want to copy my root directory to a new harddrive that I
have now mounted on /mnt. I have a /home mount and a /usr mount and
I don't want to touch those.
one the dest. drive is mounted
find / -xdev -depth -print | cpio -pvdumB /mnt
It is quick, safe, keeps permissions, blah...blah! I have used it
quite a bit!
Hope it helps.
--Jay Barbee
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: