User Tools

Site Tools


filesystem_usage

Command to show how much free space left in current filesystem

echo "Percentage free space:"; echo; for DEV in `df | egrep '^/dev' | awk '{print $1}'`; \
do echo -n "$DEV =>  "; echo `dumpe2fs -h $DEV 2>/dev/null | grep 'lock count' | tr -t '\n' ' ' | \
        awk '{printf "100*%s/%s", $3-$7, $3, "free"}'` | bc; done

filesystem_usage.txt · Last modified: 2024/05/23 07:26 by 127.0.0.1

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki