[clug] Who has better dd foo than I?

Tony Breeds tony at bakeyournoodle.com
Mon Aug 6 21:03:19 MDT 2012


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

Yours Tony
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/linux/attachments/20120807/f5f66780/attachment.pgp>


More information about the linux mailing list