怎么用DD命令创建个1G又1byte的文件?

12 views
Skip to first unread message

EastAnt

unread,
Oct 13, 2011, 3:14:56 AM10/13/11
to Chengdu Linux User Group
求助,怎么用DD命令创建个1G又1byte的文件?
谢谢~

lxd

unread,
Oct 13, 2011, 3:46:20 AM10/13/11
to cdlug_c...@googlegroups.com
dd if=/dev/zero of=xxxxxx count=1 bs=`expr 1024 \* 1024 \* 1024 + 1`

2011/10/13 EastAnt <ray.zh...@gmail.com>
求助,怎么用DD命令创建个1G又1byte的文件?
谢谢~

--
You received this message because you are subscribed to the Google Groups "Chengdu Linux User Group" group.
To post to this group, send email to cdlug_c...@googlegroups.com.
To unsubscribe from this group, send email to cdlug_communi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cdlug_community?hl=en.


Tang Daogang

unread,
Oct 13, 2011, 4:23:22 AM10/13/11
to cdlug_c...@googlegroups.com
dd if=/dev/zero of=1.img bs=1 count=1073741825
记录了1073741825+0 的读入
记录了1073741825+0 的写出
1073741825字节(1.1 GB)已复制,3564.11 秒,301 kB/秒

够慢的。


2011/10/13 EastAnt <ray.zh...@gmail.com>
求助,怎么用DD命令创建个1G又1byte的文件?
谢谢~

--
You received this message because you are subscribed to the Google Groups "Chengdu Linux User Group" group.
To post to this group, send email to cdlug_c...@googlegroups.com.
To unsubscribe from this group, send email to cdlug_communi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cdlug_community?hl=en.




--
Nothing is impossible.

lxd

unread,
Oct 13, 2011, 4:31:05 AM10/13/11
to cdlug_c...@googlegroups.com
你把参数值掉过来了当然慢了……

dd if=/dev/zero of=xxxxxx count=1 bs=`expr 1024 \* 1024 \* 1024 + 1`
1+0 records in
1+0 records out
1073741825 bytes (1.1 GB) copied, 34.5489 s, 31.1 MB/s


2011/10/13 Tang Daogang <daoga...@gmail.com>

EastAnt

unread,
Oct 17, 2011, 10:06:58 PM10/17/11
to Chengdu Linux User Group
3Q

On Oct 13, 4:31 pm, lxd <edl.e...@gmail.com> wrote:
> 你把参数值掉过来了当然慢了......
> dd if=/dev/zero of=xxxxxx count=1 bs=`expr 1024 \* 1024 \* 1024 + 1`
> 1+0 records in
> 1+0 records out
> 1073741825 bytes (1.1 GB) copied, 34.5489 s, 31.1 MB/s
>
> 2011/10/13 Tang Daogang <daogangt...@gmail.com>
>
>
>
>
>
>
>
> > dd if=/dev/zero of=1.img bs=1 count=1073741825
> > 记录了1073741825+0 的读入
> > 记录了1073741825+0 的写出
> > 1073741825字节(1.1 GB)已复制,3564.11 秒,301 kB/秒
>
> > 够慢的。
>
> > 2011/10/13 EastAnt <ray.zheng...@gmail.com>
Reply all
Reply to author
Forward
0 new messages