[1066110 views]

[]

[toggle ads]

Odi's astoundingly incomplete notes

New entries | Code

Copying tar files between Linux and Solaris / SunOS

The tar file format produced by GNU tar is slightly incompatible with Unix tar on Solaris. You will notice that when you tar deeply nested directory hierarchies like java class trees or Java API documentation. Then the Unix tar would complain about @LongLink stuff. Solution: use pax instead of tar.
# this creates an archive of a directory
pax -w -f archive.tar directory
# this extracts an archive
pax -r < archive.tar
The only drawback: pax doesn't support compression directly. So an extra gzip/gunzip doesn't do harm.

posted on 2007-12-18 16:25 CET in Code | 5 comments | permalink
I've never done it, but I remember someone saying that gnu tar can be built and run on Solaris, and so that might be another way of getting around this problem.

Julius Davies
Yes, GNU tar can be compiled for Solaris. But that is the machine of a customer and it would take ages to request them to install GNU tar.
Odi
Ahhhhhhhh........ :-)
Doh - forgot signature! - Julius
Excellent!, this saves my day. Thanks