Skip to content

Instantly share code, notes, and snippets.

@pierew
Last active August 29, 2015 14:06
Show Gist options
  • Save pierew/f423b13286d35f2e8dd0 to your computer and use it in GitHub Desktop.
Save pierew/f423b13286d35f2e8dd0 to your computer and use it in GitHub Desktop.
ddpvdd - A DD and PV Integration to use DD with Progress Bar
#!/bin/bash
echo "Input: $1"
size=$(du -k "$1" | cut -f 1)
size=$(($size/1024))
echo "Output: $2"
echo "Size: $size MB"
dd if="$1" | pv --size="$size"M | dd of="$2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment