天天看點

linux u盤讀取速度,[作業系統]linux dd指令測試U盤讀寫速度

[作業系統]linux dd指令測試U盤讀寫速度

0 2015-06-19 00:00:23

1. dd指令簡述:

if=輸入檔案, of=輸出檔案, ibs=一次讀取位元組數, obs=一次寫入位元組數, bs=設定一次讀取寫入的位元組數, skip=跳過的bs數, count=拷貝的塊數

2. 使用/dev/null和/dev/zero

1. 把/dev/null看作"黑洞", 它等價于一個隻寫檔案, 所有寫入它的内容都會永遠丢失

2. /dev/zero是一個僞檔案, 但它實際上産生連續不斷的null的流

3. 測試U盤讀寫速度## 切入u盤目錄,測試寫入速度

# dd if=/dev/zero of=./largefile bs=8k count=10000

10000+0 records in

10000+0 records out

81920000 bytes (82 MB) copied, 11.0626 s, 7.4 MB/s## 測試讀取速度 (清除緩存)

# sudo sh -c "sync && echo 3 > /proc/sys/vm/drop_caches"

# dd if=./largefile of=/dev/null bs=8k

8000+0 records in

8000+0 records out

65536000 bytes (66 MB) copied, 2.90366 s, 22.6 MB/s

來源:網際網路

轉載請保留本文網址:http://www.shaoqun.com/a/120989.html

*特别聲明:以上内容來自于網絡收集,著作權屬原作者所有,如有侵權,請聯系我們:[email protected]。

linux