[Ilugc] Re: [Tip] Create a 10MB empty file
- From: steve@xxxxxxxxxxxx (steve)
- Date: Sat Nov 13 14:14:30 2010
Hi,
On 11/13/2010 08:06 AM, Girish Venkatachalam wrote:
On Fri, Nov 12, 2010 at 12:05 PM, Vijay Kumar B.
<vijaykumar@xxxxxxxxxxxx> wrote:
dd can also be used to achieve a similar effect.
$ dd if=/dev/null of=file seek=10M bs=1
Yes it does. Thanks.
Can you explain this?
-rw-r--r-- 1 girish wheel 10485760 Nov 13 08:04 f
$ du -h f
32.0K f
I suppose du cannot see the space taken by the file on disk.
That's because there is no space taken by the file on the disk. IIRC, the
original tip was about creating sparse files which also included a link to what
a sparse file meant.
Anyways, you can try `du -bh` to get what you expect to see.
cheers,
- steve
--
random spiel:
http://lonetwin.net/
what i'm stumbling into:
http://lonetwin.stumbleupon.com/
Other related posts: