Skip to content

Instantly share code, notes, and snippets.

@jonatanblue
Last active June 28, 2017 09:37
Show Gist options
  • Save jonatanblue/75ffb9e94ed6388f87bc260607e12959 to your computer and use it in GitHub Desktop.
Save jonatanblue/75ffb9e94ed6388f87bc260607e12959 to your computer and use it in GitHub Desktop.
#!/bin/bash
grep_this=xvda1; d1=0; d2=0; while true; do d1=$(df | grep ${grep_this} | awk '{ print $4 }'); sleep 1; d2=$(df | grep ${grep_this} | awk '{ print $4 }'); diff=$(( ${d1} - ${d2} )); echo $diff; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment