Subject: Re: sparse file in ffs?
To: Technolord <l.raiser@deathsdoor.com>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: netbsd-help
Date: 05/31/2000 15:02:37
On Wed, May 31, 2000 at 02:35:32PM +0200, Technolord wrote:
>
> Hi. I'd like to know:
> . Are sparse files supported by FFS?
Yes.
> . If so, how do I actually create a sparse file?
You need a custom program for this (you need to open the file, do a seek and
write something at the end).
>
> I tried with dd if=/dev/zero, but it instead created a file of the size I
> specified, which is not what I wanted.
Sure, you write a file octet by octet, so all the file has been alloctaed. A
sparse file is a file on which only parts have really been written.
> (what I'd like to do is to create a -possibily big- partition with vnd and
> put some files a couple of megs in there. If there a way or I have to go
> ext2fs?
However I don't think you can attach a sparse file to a vnd. Just try it !
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
--