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

Re: e2image: tools for sparse files & e2sfck support



Hi Stephen,
* Stephen C. Tweedie <sct redhat com> [09. Jan. 2003]:
> On Wed, 2003-01-08 at 16:15, Theodore Ts'o wrote:
> > 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
>   $

Cool.  I never thought of cp as a filter.  Thank you.

Gregor





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