SoloCDM wrote:
> Bret Hughes wrote:
> >
> > SoloCDM wrote:
> >
> > > Is there an efficient way of searching tarballs for information and
> > > displaying the filename associated with the results? I'm familiar
> > > with most of the "z" filenames (zless, zcat, ...).
> >
> > I am not real sure what you are looking for but I use midnight commander
> > to browse tarballs.
> > type at the command line:
> > mc
> > and then ues the arrow keys to navigate to the tarball (enter on a
> > directory will enter it) treat the tarball file just like a directory.
> > You can then use the builtin editor to view files copy one out of the
> > tarball to another place on the drive. Really quite a powerfull tool.
>
> My intent is to make it automated in a bash script to search for a
> subject.
efficient my guess is no, but i guess it is all relative.
Probably need to learn perl :) just kidding Cameron
Really, it depends on which is in shorter demand: memory, diskspace, cpu
cycles and how big the tarballs are of course. I am sure you have already
thought through the logic:
One way would be to untar the thing, into a big temp dir and grep -R
subjectword[s] > subjectword.file.list and then delete the thing
If harddrive space is at a premium a tar -t * will return a list of
directories I think and then youcould go get each file and grep it saving the
filenames to a file.
Like I said you probably already know this. I answered in case you
wanted(needed) my two cents. I have not the definitive answer maybe sme one
will.
BTW I find your messages and requests for help a little terse most of the
time. More information up front would help you get more responses I suspect.
Hope this helps,
Bret
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.