Skip to content

Instantly share code, notes, and snippets.

@jgrar
Last active August 29, 2015 14:02
Show Gist options
  • Save jgrar/28645cd974402a3e4b96 to your computer and use it in GitHub Desktop.
Save jgrar/28645cd974402a3e4b96 to your computer and use it in GitHub Desktop.
#/bin/sh
# the redirections are a bit confusing, but trust me it works
# progress_gpio.sh (change at your discretion) should read integers representing
# percentage progress and manipulate the leds accordingly
dd if="/dev/sda" | pv -EEn 2>&1 > out.img | progress_gpio.sh
# out.img should be a raw dump of the disk, but i'd recommend also
# saving an fdisk -l "/dev/sda". You could also compress the image
# with a little more redirection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment