-
-
Save ayn/793dca5b76d40c01745761b083611cc1 to your computer and use it in GitHub Desktop.
df Replacement
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 | |
if [ ! -z "$*" ]; then | |
echo "this is ~/bin/df, use /bin/df" | |
exit 1 | |
fi | |
protect=`mount | grep -v "read-only" | grep "protect" | cut -f 3 -w` | |
nosuid=`mount | grep -v "read-only" | grep "nosuid" | sed -n 's/.*\(\/Volumes\/.*\) (.*/\1/p' | sed 's/[[:space:]]*$//' | sed 's/.*/"&"/'` | |
/bin/df -PH $protect $nosuid | cut -f 2- -w |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment