Skip to content

Instantly share code, notes, and snippets.

@xandout
Created March 19, 2015 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xandout/04063497a47a09ef4a80 to your computer and use it in GitHub Desktop.
Save xandout/04063497a47a09ef4a80 to your computer and use it in GitHub Desktop.
Watch MDADM progress on QNAP.
#the busybox on my QNAP TS-420U does not have the watch command so.......
while sleep 5; do
cls; #clear the screen in the loop incase the string length changes dramatically.
TM=`date`;
STATUS=`grep finish /proc/mdstat`;
echo -ne "$TM$STATUS"\\r; #-ne and \\r(escape the escape char) will make it update in place. http://stackoverflow.com/a/12628482
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment