Skip to content

Instantly share code, notes, and snippets.

@zxt5105515
Created July 20, 2021 06:45
Show Gist options
  • Save zxt5105515/0161bb98d303961713897721858d9651 to your computer and use it in GitHub Desktop.
Save zxt5105515/0161bb98d303961713897721858d9651 to your computer and use it in GitHub Desktop.
get remain dist space in macos
#!/bin/bash
usedDisk=`df -H |sed -n '2p'|awk '{print $5}'|cut -f 1 -d '%'`
if ((usedDisk>97)); then
echo "disk used is $usedDisk"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment