Looking for a file within a given slackware distribution.

Hi: suppose you want to look for file foo belonging to the Slackware N.N distribution. Then either you make a full installation or N.N and look into /var/log/packages (grep) or you go to some Slackware index tree in the web and you traverse the tree node by node, which would be a great deal of work to do and therefor impracticable.

Now suppose further that you are not able, momentarily, to install N.N to your disk. Perhaps you have it now occupied by another O.S. or for whatever reason. So your only place where to look at is the N.N disk itself. In this disk your have PACKAGES.TXT and FILELIST.TXT. But neither of these will do. They list packages but not their contents.

So, in spite of having the disk, you arent able to know if foo is there or not or, in case you know it is, in which package. Is this really true?

A lot of the distribution files for linux are in the form of either somefile.tgz (sometimes somefile.tar.gz) or somefile.tar.bz2

These are compressed archives that cannot read directly.
mount your cd
for tgz and tar.gz files

cd /path/to/cdrom 
find . -name '*.tgz'  -exec tar tfz {} \; | grep foo
find . -name '*.tar.gz' - exec gzcat {} \; | tar tf - | grep foo

for bz2 files, ( .tbz, tar.bz2 etc. ) use

cd /path/to/cdrom
find . -name '*.bz2' -exec bzcat {} \;  | tar tf | grep foo

Thank you very much.