Sample Header Ad - 728x90

extending recursive find to .tar, tar.gz, tar.bz2, and tar.xz on Debian 12

0 votes
2 answers
199 views
Continuing https://unix.stackexchange.com/questions/34008/find-a-file-within-a-tar-gz-archive , how is it possible to automatically recursively search for files with given names, including the files inside the archives and compressed archives? For example, if foo.tar.gz, dir1/bar.tar.bz2, dir2/dir3/foobar.tar.xz, and dir4/dir5/dir6/barfoo.tar are in the current directory, then
deepfind . -iname baz
(I made the name deepfind up) should look for the file named baz (in arbitrary case) not only in the usual directory structure below . but also in the contents of the four (compressed or plain) aforementioned tar archives. Our system is Debian 12, so that nobody attempts to suggest or even mention obsolete, uninstallable, or unusable software.
Asked by AlMa1r (1 rep)
Apr 27, 2024, 04:01 PM
Last activity: Jun 20, 2024, 08:37 PM