On Thu, 5 Sep 2002 [EMAIL PROTECTED] wrote:

> This is in the "There has to be an easy way to do this" category-
> 
> 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. 
> 
> (If the people who set up the CD had tarred it properly, I wouldn't have this 
>problem.)
> 
> I'm looking for a command or script which would work from the top dir like:
> 
>     $ tar -Rxz *.tar.gz
> 
> would work if it worked that way, which of course it won't, since -R is an invalid 
>option for tar.
> 
> In english: 
> "Descend though all subdirectories from the present directory, 
> and extract all tar.gz files right where they sit."
> 
> I looked at piping the output from ls, but it only outputs filenames, not the 
>required paths,
> so I don't even know where to start with writing a script.
> 
> Any ideas?


Ah yes, this smacks of shell-scripting.  I can't give you a fast answer 
but if you don't receive replys here you might try the shell.scripting 
list found at http://moongroup.com/mailman/listinfo/shell.scripting.  Low 
volume and very good help.





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

Reply via email to