Solved

tar & gzip question

Posted on 2003-11-14
11
1,266 Views
Last Modified: 2013-12-27
dead simple really,

on linux i can run a: tar -zcvf myextract.tar.gz files

but on solaris this doesn't work, whats the smart way to accomplish the same thing, ie tar and zip in one move..

pg
0
Comment
Question by:Peewee
  • 3
  • 3
  • 2
  • +2
11 Comments
 
LVL 18

Expert Comment

by:liddler
ID: 9746944
If it is solaris 8/ 9 use zip / unzip instead of gzip & tar.  If you are on solaris 2.6 or lower you may need to sownload it from www.sunfreeware.com
0
 
LVL 5

Author Comment

by:Peewee
ID: 9747063
tar cf - . | zip backup -

0
 
LVL 6

Expert Comment

by:durindil
ID: 9748688
You can also install the gnu utilities, and get the linux functionality in Solaris.
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 24

Accepted Solution

by:
shivsa earned 30 total points
ID: 9749233
tar cvf - /home/myextract | gzip - > myextract.tar.gz
0
 
LVL 48

Expert Comment

by:Tintin
ID: 9767509

shivsa has the correct answer.
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9801004
Any update on this ???? need more help...
0
 
LVL 5

Author Comment

by:Peewee
ID: 9816909
shivsa,

marvellous and the code to extract the file ?

peewee
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9818705
Good to know it worked. You can close the question by following this guidelines:

http://www.experts-exchange.com/help.jsp#hs5
0
 
LVL 5

Author Comment

by:Peewee
ID: 9823815
shivsa,
as i stated in mylast comment how do i take a distribution and untar and unzip it in the same process?

ie the reverse..

peewee
0
 
LVL 18

Assisted Solution

by:liddler
liddler earned 20 total points
ID: 9823871
gunzip myextract.tar.gz && tar xvf myextract.tar
0
 
LVL 48

Expert Comment

by:Tintin
ID: 9888307
The better way to extract the files (no need to waste space uncompressing the archive first) is

gzip -dc myextract.tar.gz | tar xvf -

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question