How to extract the attached tar.gz files easily?
I need to extract a tar.gz file. That's about 950 MB. It has 23 more tar.gz files. Each of these 23 tar.gz files has one tar file. My questions are, how can I easily extract all of them? Is there a command line tool that I can use?
The structure looks like this:
foo.tar.gz
ββββbar1.tar.gz
β ββββfoobar1.tar
ββββbar2.tar.gz
β ββββfoobar2.tar
ββββbar3.tar.gz
β ββββfoobar3.tar
ββββbar4.tar.gz
β ββββfoobar4.tar
ββββbar5.tar.gz
β ββββfoobar5.tar
ββββbar6.tar.gz
β ββββfoobar6.tar
| ..........
| ..........
| ..........
| 23 of them
Thanks in advance.
+2
a source to share
3 answers
As a result, I manually extracted foo.tar.gz and used the following shell script to extract those * .tar.gz files.
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
for next in *.tar.gz
do
echo "Untaring - $next"
tar -xzf $next -C ~/foo
done
exit 0
hope this helps someone.
+1
a source to share