Last active
December 19, 2015 15:19
-
-
Save ryran/5975607 to your computer and use it in GitHub Desktop.
A tiny bash function that causes dd to show status updates until it finishes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Takes the pid of a dd process as an argument and loop-updates the status until it finishes | |
function ddinfo { | |
kill -USR1 $1 | |
while :; do | |
kill -0 $1 && { sleep 1m; kill -USR1 $1; } || { echo "DONE"; break; } | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment