[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Q] e2image: tools for sparse files & e2sfck support



Hi,

On Wed, 2003-01-08 at 16:15, Theodore Ts'o wrote:

> bzip2 or gzip do a very nice job of compressing a sparse file.
> Unfortunately, bunzip2 and gunzip do not write out a sparse file when
> it uncompresses it.  It isn't hard to write a program though that will
> write a sparse file given a file with lots of zeros on stdin

Actually, I think "cp --sparse=always" will do such a copy, and you can
use /dev/stdin as the source to make it work in a pipe:

  $ dd bs=4k count=100 if=/dev/zero | cp --sparse=always /dev/stdin /tmp/sparse 
  100+0 records in
  100+0 records out 
  $ du /tmp/sparse
  0       /tmp/sparse
  $

Cheers,
 Stephen





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]