Home » Questions » Computers [ Ask a new question ]

Linux: How to create a folder that behaves like a file?

Linux: How to create a folder that behaves like a file?

I would like to be able to combine several files into one file and be able access the inner files without having to do any sort of unpacking. Something like the universal binary for Mac.

Asked by: Guest | Views: 21
Total answers/comments: 2
Guest [Entry]

"Unpacking/decompressing the archive explicitly is not strictly necessary. You want a FUSE (Filesystem in User Space) that allows you to mount archive files.

Any necessary unpacking/repacking is done in the filesystem, so it's transparent to the programs you'd use to access or modify files inside a mounted archive.

One such project is archivemount (Wikipedia link, source tarballs). It and various other projects are listed on Sourceforge's wiki ArchiveFileSystems page. Different projects use different libraries as backends to do the actual work.

Some projects only seem to support read operations, but many are young and may include write features at a later date.

archivemount uses libarchive, accesses cpio, .tar.gz, .tar.bz2 archives
fuse-zip uses libzip, includes write-support for .zip archives
avfs (A Virtual FileSystem) ""supports floppies, tar and gzip files, zip, bzip2, ar and rar files, ftp sessions, http, webdav, rsh/rcp, ssh/scp"" and others.

Ideally, a FUSE filesystem for archives will work a bit like the Windows Explorer's support for browsing .zip files."
Guest [Entry]

you can use loop device: http://en.wikipediadotorg/wiki/Loop_device. How to: http://www.walkernews.net/2007/07/01/create-linux-loopback-file-system-on-disk-file/ (kudos for Zoredache from serverfault)