Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a directory that is always going to be storing text files that are rarely (think weekly) used. Naturally this is a great place to use compression. However, rather than having to use tar ever time I want to access a file, I would love it if I could "mount a compressed folder".

Lets assume the folder is called mydir

Ideally the following should be true:

  • Items copied/moved/deleted/read in mydir without programs needing to know that the directory is compressed
  • When a file from mydir is read by a program, only that file is decompressed, not the entire directory.
  • The directory should be always available. (maybe mounted on boot or login)
share|improve this question
up vote 9 down vote accepted

If read-only access is acceptable, then SquashFS is a good choice.

However, it sounds like you want to be able to do in place updating as well. Btrfs may be an option for you. It is still considered somewhat experimental, but it does support transparent file compression, and is available to try in most distros.

The other approach is to do this in userspace, via FUSE. The most plausible of the options here is probably fusecompress.

share|improve this answer

Your Answer


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.