Created
January 8, 2015 02:39
-
-
Save checko/4263ecf68686c101731f to your computer and use it in GitHub Desktop.
check disk usage and clear cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mkdir /cbox | |
mount -t vfat /dev/block/mmcblk0p7 /cbox | |
uspct=$(df | grep cbox | awk '{ print $5 }' | cut -d'%' -f1) | |
echo $uspct | |
if [ $uspct -ge 90 ]; then | |
echo 'great!' | |
rm -r /cbox/Android | |
rm -r /cbox/DCIM | |
fi | |
echo 'nothing' | |
umount /cbox |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment