Recently, I had to extract a particular file inside a zip file. So, what I had to do is, I have to download the zip file, extract it and copy the file. Or use some GUI tool to open the zip file and have a look at it contents and extract only the file I need. I know that we can mount the iso files to a folder and view its contents. As iso files and zip files are similar in nature (ie. has multiple files/folders inside them), I thought whether I can mount it and copy only the file that I need.
And, after searching a bit, I came across fuse-zip. This is a kool tool and it is also part of ubuntu software repositories.
Couple of features I liked:
- Obviously, the main purpose, I can mount a zip file to a folder and access it like any other folder.
- Now comes the best part: If you have modified the content of a file or folder, once you unmount the folder, Guess what?? It includes your changes into the zip file 🙂 (Be careful when you are using editors that create backup files when you started editing a file and I don’t think you want to include them in the zip files when you create them)
After using this for some time, I became a fan of it 🙂
I think this is how fuse works: (Being a Java developer, I am writing in those terms.) Fuse provides an interface to which different handlers can register them selves. These handlers should be responsible for understanding the file systems. These file system can be zip files, iso files, ssh session, or even a database 🙂 The handlers can have the logic to translate the linux commands (changing/moving/deleting directories) that the user provides to the one appropriate for the underlying filesystem.
Kool.. isn’t it??