Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Looking for a quick script solution



On Jul 25, 2009, at 8:29 PM, sgoldman wrote:
>        If there was ever a need for a script this is it.. little  
> experience here though..


No script needed.  Just:

   gunzip *.gz

If that throws a too many files error then you should use a find  
command:

   find . -depth 1 -name "*.gz" -print | xargs gunzip

This finds all files in the current directory (.) but no deeper than  
the current directory (-depth 1) that match "*.gz" and execs gunzip on  
each one.  It is slower than a single shell glob.  Much slower.  It  
has to open and stat the directories and then exec gunzip for every  
file.  On the other hand, it works even when you have so many files  
that you can't use a shell glob.

--Rich P.






BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org