Solved

tar & gzip question

Posted on 2003-11-14
11
1,271 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
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
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…
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.
Suggested Courses

623 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