Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to mount a file.tar.bz2 without extracting it onto the filesystem? I don't care if the mount is read only.

Hopefully your answer will also apply to file.tar.gz.

"mount" in this context is meant to be akin to mounting an ISO file.

share|improve this question
1  
Tar archives are usually not mounted. Did you think of archivemount sourceforge.net/apps/mediawiki/fuse/…mount_archives.28tar.2C_cpio.2C_....29 ? –  Benjamin Bannier Mar 14 '11 at 18:16

3 Answers 3

If you want to mess with fuse they have a plugin to mount archives, including tar.gz.

I'm kind of questioning what you want to do. there is a pretty huge model mismatch between a filesystem (random access to files, random access to bytes in a file) and an archive (needs to be read serially, a write in one byte can will affect all subsequent bytes). At least mount read only.

share|improve this answer

The term mount in this context is ill-defined. I'm guessing you want to look inside the tarball without extracting it. One handy utility for this is Midnight Commander. See also Wikipedia Midnight Commander page.

This creates a sort of virtual filesystem for tarballs, rpms, deb and all sorts of other archives. Just fire it up, and navigate to your tarball, and hit Enter. To read a file use F3, F5 to copy a file, F10 quit. On Linux at least there is a convenient command help at the bottom of the screen.

So, to summarize you can read the files inside your tarball and copy them from to your regular filesystem. Hopefully that will do you.

I did a little more checking, and it looks like MC is basically only supported on Unix-like systems like Linux, though there is a Windows port here of some sort. However, you don't state what your OS is. I suggest you do so.

share|improve this answer

Do you really need to mount it? Why is using the archive manager (Linux/gnome) not sufficient? If you're going to need it frequently then it seems (to me at least) that you might be better off just unbzing and mounting it normally.

You might try using an OS that allows compression of entire file systems if the simpler options aren't sufficient. For example FreeBSD with the ZFS file system is one possibility.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.