Skip to content

Instantly share code, notes, and snippets.

@ejangi
Created December 31, 2013 06:49
Show Gist options
  • Save ejangi/8193475 to your computer and use it in GitHub Desktop.
Save ejangi/8193475 to your computer and use it in GitHub Desktop.
This is a OS X command line script to get the percentage of HDD space used
#!/bin/sh
PERCENT=`df / | grep / | awk '{ print $5}' | sed 's/%//g'`
echo "$PERCENT% HDD space used"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment