Skip to content

Instantly share code, notes, and snippets.

@Gen2ly
Created August 2, 2012 23:36
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 Gen2ly/3242049 to your computer and use it in GitHub Desktop.
Save Gen2ly/3242049 to your computer and use it in GitHub Desktop.
Print disk usage
#!/bin/bash
# Print disk usage
# Key word exclusions (seperated by space)
exclude=(sandfox)
df -h | grep -e '^Filesystem' -e '^/dev' | \
grep -vf <(printf "%s\n" "${exclude[@]}") | \
sed 's/^/ /g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment