[clug] Who has better dd foo than I?

David Austin david at d-austin.net
Mon Aug 6 21:09:06 MDT 2012


On 7 August 2012 13:03, Tony Breeds <tony at bakeyournoodle.com> wrote:

> On Tue, Aug 07, 2012 at 11:53:20AM +1000, Andrew Janke wrote:
> > It does create a file of this size but of course du and df don't take
> > much notice.  I have also found this:
> >
> >    http://sandeen.fedorapeople.org/utilities/fallocate.c
> >
> > But I think it will suffer the same problem, I say think as I haven't
> tried it.
>
> fallocate is what you want.
>
> [tony at thor ~]$ df -Th .
> Filesystem     Type  Size  Used Avail Use% Mounted on
> /dev/sda5      ext4  154G  119G   28G  81% /home
> [tony at thor ~]$ fallocate -l 10G foo
> [tony at thor ~]$ df -Th .
> Filesystem     Type  Size  Used Avail Use% Mounted on
> /dev/sda5      ext4  154G  129G   18G  88% /home
>
>

I would have thought that that setting the reserved precentage is the way
to go -
assuming the actual filesystem supports it.

David


More information about the linux mailing list