1753797 Members
7408 Online
108799 Solutions
New Discussion юеВ

Re: cpio vs tar

 
romano r
Frequent Advisor

cpio vs tar

hello,
I need to replicate several directories of a NFS files system coming from a SFU NAS file server.

The destination machine is RHEL4.
I mounted both files systems (source and destination) on a HPUX 11i machine.
I tried to use cpio (as I'm used in the UX-UX transfer) like this:
find . -depth -print |cpio -pdum /aaa/xfer/

but it returns errors with sym links.

I tried to use tar like this (as suggested by the man page):
tar cvf - . |( cd /aaa/xfer/ ; tar tvf - )

and it seems working fine even if slower than cpio.

So my idea is to use tar.
Someone knows if tar is not suitable for this pourpose or some other reason to prefer cpio.

I avoided to mount directly the source file system on a RHEL4 machine because the GNU cpio does not recognize the SFU as a native UX file system and returns more errors.

thank you
Kind Regards
Romano
2 REPLIES 2
Steven Schweda
Honored Contributor

Re: cpio vs tar

I'd expect "tar" to work fine, for some
values of "tar". The native HP-UX "tar"
program may have trouble with long names, for
example, so "pax" or GNU "tar" might be more
suitable.

> The destination machine is RHEL4.

Why drag the HP-UX system into the picture?

> [...] because the GNU cpio does not [...]

But if you use NFS on the Linux system, ...?
Jeeshan
Honored Contributor

Re: cpio vs tar

check out this link

http://rightsock.com/~kjw/Ramblings/tar_v_cpio.html
a warrior never quits