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=10
10+0records in
10+0records out
81920bytes (82mb)copied,11.0626s,7.4mb/s
## 測試讀取速度 (清除快取)
# sudo sh -c "sync && echo 3 > /proc/sys/vm/drop_caches"
# dd if=./largefile of=/dev/null bs=8k
8+0 records in
8+0 records out
65536 bytes (66 mb) copied, 2.90366 s, 22.6 mb/s
怎麼用dd命令測試U盤讀寫速度
1.如何確認host是將外設識別為2.0還是3.0 a 關注dmesg,檢視如下字串 usb 2 1 new superspeed usb device number 2 using xhci hcd 說明是識別為3.0的外設 usb 2 1 new high speed usb device nu...
Linux下讀寫速度測試
一.檔案一次讀入速度 linux下讀檔案這東西最後都是要通過系統呼叫sys read fd,buf,count 來實現的,所以如果要提高速度,就是最簡單地呼叫sys read的封裝,比如直接用read 或fread 下面是我在linux下的幾個測試。首先建立乙個130m資料檔案 dd if dev ...
Linux下讀寫速度測試
tag clinux 一.檔案一次讀入速度 linux下讀檔案這東西最後都是要通過系統呼叫sys read fd,buf,count 來實現的,所以如果要提高速度,就是最簡單地呼叫sys read的封裝,比如直接用read 或fread 下面是我在linux下的幾個測試。首先建立乙個130m資料檔案...