Solved

tar & gzip question

Posted on 2003-11-14
11
1,262 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

911 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now