Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

tar & gzip question

Posted on 2003-11-14
11
Medium Priority
?
1,273 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 24

Accepted Solution

by:
shivsa earned 120 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 80 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

721 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