It seems one cannot mount a tar file (read only), similarly as one mounts an ISO image file. At least, I have not found any implementation.

It would be useful, for example to run a find command inside.

Is this really (or practically) impossible to implement? Why?

UPDATE By accepted answered, this is indeed possible, though a program (not included in present distributions) must be instaled. It worked for me. I copy the installation and use steps in my scenario (Fedora 12).

  # yum install fuse fuse-libs fuse-devel 
  # yum install libarchive libarchive-devel
  # cd /tmp && wget http://www.cybernoia.de/software/archivemount/archivemount-0.6.0.tar.gz
  # tar xzf archivemount-0.6.0.tar.gz && cd archivemount-0.6.0
  # ./configure && make && make install
  # man archivemount
  #  archivemount -o ro /tmp/mytar.tgz /mnt/tt
link|improve this question
1  
tar -tf yourfile.tar | grep 'pattern' – Javier May 4 '10 at 14:42
Not exactly an answer but you could use tar -tvf somefile.tar | grep something. voted up for beating me to it. :) – egorgry May 4 '10 at 14:42
I know that, but find lets you specify a lot of criteria and logic (sizes, timestamps), tar+grep falls a little short. – leonbloy May 4 '10 at 14:46
you could pipe to find and get creative. – egorgry May 4 '10 at 14:56
I love playing with pipes and command lines, but that doesnt apply here. 'find' is not fed from stdin but from som path in some filesystem – leonbloy May 4 '10 at 15:14
feedback

1 Answer

up vote 6 down vote accepted

Traditionally, no it's not possible.

However, you can do so using the FUSE filesystem archivemount under Linux.

IMNSHO this is a bit of a novelty and not usually necessary, but I can see a few edge cases for it.

link|improve this answer
One of possible use cases is mine - I'd like to be able to mount archives on remote server, to be able to perform incremental backups to them by rsync. Not sure if it will work fast. – Shaman Mar 19 at 11:47
feedback

Your Answer

 
or
required, but never shown

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