TechSpot

Gzip and tar @ the same time in Solaris...

By lokem
Mar 26, 2002
Topic Status:
Not open for further replies.
  1. Hi all,

    Anyone knows how to tar and gzip a file at the same time in Solaris 8?

    This is easy to do under Linux with tar xzvf, but I'm not sure how to pipe the commands under Solaris...

    TIA.
     
  2. Mictlantecuhtli

    Mictlantecuhtli TS Evangelist Posts: 4,916   +9

    gunzip < file.tar.gz |tar xfv -
     
  3. lokem

    lokem TS Rookie Topic Starter Posts: 773

    COol thanks. What about gzipping a file?
     
  4. Mictlantecuhtli

    Mictlantecuhtli TS Evangelist Posts: 4,916   +9

    (g)zip (-r) package-name file(s). Use -r if you want to include subdirectories as well.
     
  5. lokem

    lokem TS Rookie Topic Starter Posts: 773

    Thanks. I was actually asking how to tar and gzip (compress) at the same time. Guess I should have made my question a little bit more clearer :eek:
     
  6. Mictlantecuhtli

    Mictlantecuhtli TS Evangelist Posts: 4,916   +9

    tar -cf package files/directories ;gzip package.tar
    By the way, bzip2 compresses much better than gzip.
     
  7. lokem

    lokem TS Rookie Topic Starter Posts: 773

    Ahh... The semicolon ;) Thanks for the heads up. Yups, thanks for the bzip2 tip as well. I'll use bzip2 when I can, but it isn't installed in the system I'm using :(
     
  8. Mictlantecuhtli

    Mictlantecuhtli TS Evangelist Posts: 4,916   +9

    By the way, not all versions of tar add that .tar extension there.
     
Topic Status:
Not open for further replies.


Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...


Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.