e2bitmap
e2bitmap
is a quick hack I (pjm) wrote to satisfy my curiosity
about what sort of cluster bitmaps most files have.
I include it in the main distribution because someone (Stefan Monnier) once asked for a program to do this.
The e2bitmap
program tells you which clusters of a file are
compressed, and which are uncompressed. The bitmap is represented as a
list of ones and zeros, where `1' means a compressed cluster and
`0' an uncompressed cluster, and the first cluster of the file is
represented by the left-most digit.
If there are no compressed clusters then the word `uncompressed' is displayed instead of a list of digits.(2)
One use for this program is shown in section Which files have an indirect cluster bitmap block?.
Another use for it is in cases where you want ext2fs to do only the
online decompression while leaving the compression to a cron job (for
instance). The cron job might use e2bitmap
to see which files
deserve recompression in order to avoid recompressing unchanged files
over and over again. Use `chattr -m none files' to prevent
the kernel from doing the compression right away, and, for example,
`chattr -m gzip9 -s none files' in the cron job.
Go to the first, previous, next, last section, table of contents.