Solved

tar & gzip question

Posted on 2003-11-14
11
1,261 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
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…
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.

744 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

13 Experts available now in Live!

Get 1:1 Help Now