在 Linux 系統呈現 dd 的進度
範例:定時呈現 dd 進度
撰寫一個名為 show_all_dd.sh 的 shell script, 針對全部的 dd 指令:
#!/bin/bash
while
killall -USR1 dd;
do sleep 5;
done
或者用 pid 指定特定的 dd process,假設將 shell 存為 show_dd.sh 檔名,
可用 ./show_dd.sh pid 來執行[pid 是 dd 的 process ID]
#!/bin/bash
# 這邊要依據自己系統上的 dd process ID
pid=$1
while
kill -USR1 $pid;
do sleep 5;
done
Last modified 10mo ago