Extracting from Tar Balls.

A

Anonymous

Guest
So I have a tar ball (multiple actually) that hold a directory structure and all of the files contained in those directories.

I need a command that can extract all files from the tarball matching a regular expression and still preserve the directory structure so I can immediately extract them to the intended directory.

Ideas?
 
for file in `ls | grep -i [expression]`; do ; tar xvfz $file; done;
 
Back
Top