Solaris – Compress, Uncompress

September 1st, 2009

Backup to a USB drive

Mount USB drive and check contents

# volrmmount -i rmdisk0; cd /rmdisk/rmdisk0; ls -FC

tar -cf foobar.tar /tmp/dir

jar cf foobar.jar /tmp/dir/*

jar are cool, they do however require the Jave Runtime Engine.  jar’s do not maintain soft links the do follow the soft link and copy the contents. 

compress -v foobar.tar

ends up with foobar.tar.Z

to view compress files use zcat foobar.tar.Z | less

or extract the output in conjunction with tar

zcat foobar.tar.Z | tar xf –

uncompress -v foobar.tar.Z

look at contents with uncompress

uncompress -c foobar.tar.Z | tar xvf –

compress and uncompress with 7za

7za a foobar.7z file1 file2

7za x foobar.7z

gzip -v filename

gunzip filename

gzcat filename to view contents of zip file

use unzip on .jar .zip files

Trackback URI | Comments RSS

Leave a Reply

For spam filtering purposes, please copy the number 1302 to the field below: