linux终端shell语句

简要记录几个语句,后续补充:

1、dd if=/dev/zero bs=1024 count=1048576 of=/data/oneGB

# dd if=/dev/zero bs=1024 count=1048576 of=/data/oneGB                
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.0 G) copied, 20.995653 s, 49 M/s

查看emmc write speed

2、for i in $(seq 10);do echo 3 > /proc/sys/vm/drop_caches;dd if=/data/oneGB of=/dev/null bs=1024;done

# for i in $(seq 5);do echo 3 > /proc/sys/vm/drop_caches;dd if=/data/oneGB of=/dev/null bs=1024;done
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.0 G) copied, 10.238656 s, 100 M/s
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.0 G) copied, 10.319954 s, 99 M/s
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.0 G) copied, 10.208749 s, 100 M/s
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.0 G) copied, 10.070906 s, 102 M/s
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.0 G) copied, 10.384142 s, 99 M/s

查看5次emmc read speed

参考:

Linux - Linux终端/脚本中for循环结构_终端直接输入for循环-CSDN博客

shell中的for循环用法详解_shell for-CSDN博客

dd命令格式化磁盘_放学有种别跑、的博客-CSDN博客

dd命令详解_思禾的博客-CSDN博客

你可能感兴趣的:(Ubuntu,Linux,Shell,linux,运维,服务器)