Skip to content

Instantly share code, notes, and snippets.

@ryran
Last active December 19, 2015 15:19
Show Gist options
  • Save ryran/5975607 to your computer and use it in GitHub Desktop.
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.
#!/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