On Thu, 2002-09-05 at 16:28, [EMAIL PROTECTED] wrote:
> I have a directory which contains several subdirectories, each of which
> contains over 100 subdirectories, each of which contains at least one *.tar.gz file. 
> I would like to extract all the tarballs in the directories where they are now, 
> and keep the directory structure intact. 

cd /path/to/directory
find . -type d | while read dir ; do
        pushd $dir
        for i in *.tar.gz; do
                tar zxf $i
                rm -f $i
        done
        popd
done




-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to