LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-14-2007, 09:50 PM   #1
devinnull
Member
 
Registered: Dec 2005
Location: UT-USA
Distribution: RHEL 3/4 Servers - FC 5 x64 on the desktop - Edubuntu for the kiddies
Posts: 53

Rep: Reputation: 15
gunzip files in all sub-folders : RESOLVED


So somehow I messed up making a gz file I made as a backup while I moved a web site from one server to another. What I have now is a bunch of directories that unziped but, all the files in every directory are still FILENAME.PHP.GZ. and not unziped like the other directories.
example:
/var/www/sitename/
/var/www/sitename/folder1/
index.php.gz
/var/www/sitename/folder2/
subdir1
subdir2
index.php.gz
/var/www/sitename/folder3/
subdir1
subdir2
index.php.gz
...times hundreds of folders...

What I am hoping is that there is a way to un-compress any .gz files under a given path.

Thanks in advance!!!

Last edited by devinnull; 06-15-2007 at 01:12 AM.
 
Old 06-14-2007, 11:32 PM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
Code:
find /var/www/sitename -type f -iname "*.gz" -exec gzip -d {} \;
The find command is a tool you need to become comfortable with (man find)

Last edited by Dark_Helmet; 06-14-2007 at 11:33 PM.
 
Old 06-15-2007, 01:12 AM   #3
devinnull
Member
 
Registered: Dec 2005
Location: UT-USA
Distribution: RHEL 3/4 Servers - FC 5 x64 on the desktop - Edubuntu for the kiddies
Posts: 53

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Dark_Helmet
Code:
find /var/www/sitename -type f -iname "*.gz" -exec gzip -d {} \;
The find command is a tool you need to become comfortable with (man find)
Awesome, and thanks for the help! Yet another powerful window opened.
 
  


Reply

Tags
files, gzip


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Command to copy files/folders but skip bad/corrupt files?? leemoreau Linux - Newbie 2 04-02-2007 02:27 PM
Samba can create new files and folders but access denied in any new folders k.king Linux - Networking 2 01-15-2006 06:14 AM
Scattering files in folders lucky6969b Programming 1 12-20-2005 08:46 PM
sharing folders or files Johina Linux - Networking 3 02-19-2005 02:52 AM
How many files and folders do you got? BBB General 1 12-29-2004 02:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration