0

I know I can mount a single zip file as a directory for read-only access (Mount zip file as a read-only filesystem) but if I have a directory (or a directory tree) containing many zip files, is there a way to mount it as an unzipped directory tree ? For instance:

A/AAA.zip
A/BBB.zip
B/0123.tgz
B/2345.gz

would be seen as:

A/AAA/file1
A/AAA/file2
A/BBB/bigfile
etc...

I'm trying to convince the organizers of the data to unzip everything to a compressed partition so it would use basically the same space but be a lot easier to retrieve, but just in case there is a way to do this, I'm interested.

dargaud
  • 557
  • 1
  • 4
  • 18
  • 1
    Yes, there is a way. If you know how to do it once, you should be able to loop over the zip files and mount each one ... – Eduardo Trápani Aug 10 '21 at 20:12
  • Does this answer your question? [How do I recursively grep through compressed archives?](https://unix.stackexchange.com/questions/13749/how-do-i-recursively-grep-through-compressed-archives) – Gilles 'SO- stop being evil' Aug 12 '21 at 08:50

1 Answers1

0

I discovered AVFS which seems to do what I want. You just run mountavfs and then find unzipped versions of the file in a filesystem hierarchy in ~/.afvs

dargaud
  • 557
  • 1
  • 4
  • 18