Created
March 4, 2024 18:51
-
-
Save chockenberry/f278781a36ce217c82a0d280765c3622 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" | cut -f 3 -w` | |
/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