find a file within a tar.gz archive
How about just:
$ tar tf archive.tar.gz | grep foo
Mount the archive as a directory. You can do it with the AVFS filesystem, which allows you to access any archive as a directory whose name has a trailing #
.
mountavfs
cd ~/.avfs$PWD
find archive.tar.gz\# -name '*foo*'
I think it works with no pipe and grep.
like this:
tar tvf archive.tar.gz "foo"
as this way, globs will also work.
tar tvf archive.tar.gz "*.foo"