also @ TechSpot: Microsoft officially announces Xbox One: here's what we know so far

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

Discussion in 'The Alternative OS' started by lokem, Mar 26, 2002.

  1. lokem Newcomer, in training Posts: 773

    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 TS Special Forces Posts: 4,916   +9

    gunzip < file.tar.gz |tar xfv -
  3. lokem Newcomer, in training Posts: 773

    COol thanks. What about gzipping a file?
  4. Mictlantecuhtli TS Special Forces Posts: 4,916   +9

    (g)zip (-r) package-name file(s). Use -r if you want to include subdirectories as well.
  5. lokem Newcomer, in training 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 TS Special Forces Posts: 4,916   +9

    tar -cf package files/directories ;gzip package.tar
    By the way, bzip2 compresses much better than gzip.
     
  7. lokem Newcomer, in training 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 TS Special Forces Posts: 4,916   +9

    By the way, not all versions of tar add that .tar extension there.