Bar discussions . Talk about everything not only php !. Guests are welcome here , forum registration is not required.
Moderators: macek, egami, gesf
by Nullsig » Fri May 11, 2012 5:03 am
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?
-

Nullsig
- php-forum Fan User

-
- Posts: 981
- Joined: Thu Feb 17, 2011 6:52 am
- Location: Racine, WI
by egami » Fri May 11, 2012 11:48 am
for file in `ls | grep -i [expression]`; do ; tar xvfz $file; done;
-

egami
- php-forum GURU

-
- Posts: 2197
- Joined: Wed Oct 06, 2010 11:19 am
- Location: Happy Valley, UT
Return to Free time
Who is online
Users browsing this forum: Bing [Bot] and 2 guests