Problem gz files in web directory

I was trying to gzip directory in to one file. using

$ tar -zcvf mars2011.tar.gz /www/web

What happened was that every single file in every subdir under web got an exstension like index.php.gz
Obviously i need to unzip files back to normal mode like index.php
Is there a way to get them back or unzip them to normal agin
Do I have to download everything and uzip using WinRAR .. or.

Can somone help me please
I lost..
Msk

Hi.

I don't understand how that (tar) command would do that.

For us to help you further, can you say what version of what OS you are using?

(and what else might you have done to cause that?)

(and I think newer tar strip the leading / from paths, but older one's might not (maybe it always has - can't remember! :D))

I dont understand this too.
But is there a� way to fix this.
I mean unzip files back to normal state.
can I use -R to do this .
Somthing like unrar -R *.*
Im redy to download the files and uzip but I cant find any software that can do it all alt once..
There are more then 10.000 files I have to go throuth if I have to do this by hand. :mad:

Thanks

Can unrar handle gzipped-tar files?

Do you actually have a gzipped-tar file?

You probably don't want to go carte-blanche (i.e. -R everything) "unzipping" things.

Does tar tvf mars2011.tar.gz produce a list of files exactly like:

www/web/somefile...
www/web/anotherfile...
www/web/...etc...

If so, then:

cd /
tar tvf /path/to/mars2011.tar.gz | xargs -n1 -I{} gunzip {}.gz

I don't know where "unrar" came into it, or what OS you are using!

Maby I just confusing things but at lest all my files i directory are .gz
Index.php i now index.php.gz and so on ..
In all directorys all files are somthing.gz
Msk

Hi.

Forget the first sentence of my previous post. But you didn't answer any of the relevant questions after that.

cd /www
tar cvf - web |gzip > web.`date +%b%Y`.tar.gz