Solaris tar command… I hate you.

Apparently, the tar command on Solaris does not strip leading slashes. Meaning you can clobber original files if you carelessly untar them, which could be disastrous in some circumstances.  Like, say, if you clobbered /etc/ or /var/ or something. Add this to the lack of a z or j option(gunzip and bunzip built in) and Solaris tar receives a big fat pbbbbbt from me.

There is a trick here, but it uses chroot and is actually pretty nasty. Workable, but nasty. GNU tar will strip leading slashes and is available at Sun Freeware. Alternately, move it to a Linux box and do it there :)

Leave a Reply