Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 5 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
add comment

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.