I'm trying to find a (very old) file, from which I'm sure it is somewhere on my NAS. Unfortunately I have some of my old files stored inside tar.gz, zip or 7z.
Is there any way to search all files and folders including the content of these archives?
Maybe find
or locate
can be instructed to consider these archives as well and take a look inside on their way down the directory tree?
You can search within each particular archive type as follows:
You could simplify its use by always search starting in the current directory, and accepting the file matching pattern (which could include regular expressions or simply be all or part of the filename) as a command-line parameter:
Create a script (named, e.g. "arcsearch") in your executable path (e.g. /usr/local/bin), making sure you "chmod +x" it to make it executable, with this content:
Then you can simply type:
and it'll spit out the results, both "normal" files and those within archives.