讓 /bin/dd 有進度 (dd with progress Ubuntu/Fedora)

人氣點閱:8361
發表人
讓 /bin/dd 有進度 (dd with progress Ubuntu/Fedora) 2014-06-21 21:29
/ / /

讓 /bin/dd 有進度 (dd with progress Ubuntu/Fedora)



有兩種方式達成:

1. 配合 "pv" 或 "pv -s SIZE" 使用


代碼:

$ apt-get install pv  (or, yum install pv)

$ dd if=/dev/zero bs=4096 | pv -s 2G | of=/tmp/file

(這裡的 -s 2G 取代 count=524288)


2. 或者直接安裝 "dcfldd" 配合 "time"


代碼:

$ apt-get install dcfldd  (or, yum install dcfldd)

$ man dcfldd

$ dcfldd if=/dev/zero bs=4096 of=/tmp/file count=524288 statusinterval=1

$ time dcfldd if=/dev/zero bs=4096 of=/tmp/file count=524288 statusinterval=1


dd-progress-pv.jpg
dd-progress-pv.jpg


dcfldd-statusinterval=1.jpg
dcfldd-statusinterval=1.jpg



________________

美術插畫設計案子報價系統 v0.1 Beta
爪哇禾雀