Linux命令之dd

1.dd介绍

linux命令dd用于读取、转换并输出数据。

2.dd用法

-->dd if=[value1] of=[value2] bs=[value3] count=[value4]

3.实例

3.1.使用dd命令创建2G大小的文件

命令:

dd if=/dev/zero of=/root/test.log bs=2M count=1000

[root@rhel77 ~]# dd if=/dev/zero of=/root/test.log bs=2M count=1000
1000+0 records in
1000+0 records out
2097152000 bytes (2.1 GB) copied, 9.64662 s, 217 MB/s
[root@rhel77 ~]# ls -lrh test.log 
-rw-r--r-- 1 root root 2.0G Jun 28 08:59 test.log
[root@rhel77 ~]#