Login or Register to Ask a Question and Join Our Community


Please help in ungzip a gzip archive


 
Thread Tools Search this Thread
Operating Systems Solaris Please help in ungzip a gzip archive
# 1  
Old 10-01-2007
Please help in ungzip a gzip archive

Hi Gurus,

I am new to SOLARIS. I have taken a backup of a directory as

# cd /backup/bkup
# gzip -crvf /u03 >> u03.gz

Now, how can i un gzip the archive.

Please help me...........................
Thanks in Advance.
# 2  
Old 10-01-2007
Looks more like you have gzip'd the directory itself.

gzip merely does compression.

tar is the tool that combines multiple files into one archive.

You would want..

tar cf - files-to-archive | gzip >archive.tar.gz

to list them...

gunzip <archive.tar.gz | tar tf -

to untar them..

gunzip <archive.tar.gz | tar xf -
# 3  
Old 10-01-2007
Hi Porter,

What you have suggest is very much true.

But in my case, how can i retsore the files from the archive.

When i use gzip -lt it shows

Compressed Uncompressed ratio Uncompressed Name
2051892827 2097160192 2.2% u03

Please help me, otherwise i am going to loose 52 hours of my work.

Thanks..
# 4  
Old 10-01-2007
how did you create this archive?

The commands you list don't make sense to me.

gzip
c to stdout
r recursive
f force compression
v verbose

I would have expected it to recursively compress each file in /u03 in situ, but perhaps the "c" option caused it to write those files to stdout, but without any tar encoding it's just a stream of ones and zeros.

rule zero for making a backup is

"confirm the backup contains what you expected it to".

Last edited by porter; 10-01-2007 at 04:33 AM..
# 5  
Old 10-01-2007
Yes Mr. Porter,

I've realized that i've done a big mistake, by not testing the backup.

I have some files under /u03 mount point like

/u03/proddata
/u03/archives

I tried backing them up to /backup/bkup folder as

# cd /backup/bkup
# gzip -crvf /u03 >> u03.gz

Thanks for your inputs..
# 6  
Old 10-01-2007
Hi Mr. Porter,

I'll start doing the lost work.. Never i'll do this mistake again...

Thanks a lot..
# 7  
Old 10-01-2007
Quote:
Originally Posted by demoadds
I'll start doing the lost work..
Smilie

Quote:
Originally Posted by demoadds
Never i'll do this mistake again...
Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to archive logs and sftp to another archive server

Requirement: Under fuse application we have placeholders called containers; Every container has their logs under: <container1>/data/log/fuse.log <container1>/data/log/fuse.log.1 <container1>/data/log/fuse.log.XX <container2>/data/log/fuse.log... (6 Replies)
Discussion started by: Arjun Goswami
6 Replies

2. Shell Programming and Scripting

gzip

how to zip all log file in a folder expect the latest gzip * ---> will zip all log files but I don't want the latest file to be zipped ex: file1, file2, file3, file4, file5 any single command to gzip all files excpet file5 ? (2 Replies)
Discussion started by: rmann
2 Replies

3. UNIX for Advanced & Expert Users

gzip vs pipe gzip: produce different file size

Hi All, I have a random test file: test.txt, size: 146 $ ll test.txt $ 146 test.txt Take 1: $ cat test.txt | gzip > test.txt.gz $ ll test.txt.gz $ 124 test.txt.gz Take 2: $ gzip test.txt $ ll test.txt.gz $ 133 test.txt.gz As you can see, gzipping a file and piping into gzip... (1 Reply)
Discussion started by: hanfresco
1 Replies

4. Shell Programming and Scripting

Extracting from archive | compressing to new archive

Hi there, I have one huge archive (it's a system image). I need sometime to create smaller archives with only one or two file from my big archive. So I'm looking for a command that extracts files from an archive and pipe them to another one. I tried the following : tar -xzOf oldarchive.tgz... (5 Replies)
Discussion started by: chebarbudo
5 Replies

5. Shell Programming and Scripting

gzip

Hi, I want to gzip files in loop. for i in `ls *.xml`; do gzip $i; done But i am gettin error like "/usr/bin/ls: Arg list too long" Also please tell me how to do it with while loop and also using find and then exec. (7 Replies)
Discussion started by: tushar_tus
7 Replies

6. Shell Programming and Scripting

Gzip help

Hi Experts!! I was creating a zip file in a server which had zip installed in it. I have another server in which zip is not there and i am instructed to make use of gzip to compress files. I would need your help to know the way to create a gzip file. 1) I do the following to create the zip... (5 Replies)
Discussion started by: ganga.dharan
5 Replies

7. UNIX for Dummies Questions & Answers

gzip

Hi All, I have some files which are 01.tar.gz, 02.tar.gz,03.tar.gz ........30.tar.gz. when I want to extract the files I 'm using this command "gzip -dc *.tar.gz | tar -xvf -" but it just uncompress 01.tar.gz how can I uncompress all of them ? thanx alice (2 Replies)
Discussion started by: alisevA3
2 Replies

8. SCO

gzip

ciao a tutti, premesso che sono un principiante di unix, avrei bisogno di gzip/gunzip e SOPRATTUTTO delle istruzioni (ahimè dettagliatissime, come per un bimbo!) per installarlo... grazie mille, ciao (1 Reply)
Discussion started by: mfran2002
1 Replies

9. UNIX for Dummies Questions & Answers

GZIP help, please!

Gurus, My own stupidity (or ignorance...or both) put me in the situation I am in and I need help please: 1-My shell account (OS: HP UX v11) contains several work directories (/docs, /scripts...) 2-Our sysadmin has implemented aggressive disk quotas so I have to compress the files I put here... (2 Replies)
Discussion started by: alan
2 Replies

10. UNIX for Advanced & Expert Users

using gzip

Hi, I am trying to unzip a file that I unmounted onto a unix machine from a cd I had burned in a Windows machine. The file I am trying to unzip is a .tar file... it was originally a .tar.gz file because it was zipped using gzip. I have tried: % gzip -d hpux.tar (where hpux.tar is the file... (2 Replies)
Discussion started by: nattie_h
2 Replies
Login or Register to Ask a Question

Featured Tech Videos