Last active
July 15, 2017 10:35
-
-
Save mdpuma/497d6f46b052e9339e64 to your computer and use it in GitHub Desktop.
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/bash | |
# show inodes by current dir | |
for i in `ls`; do echo -n "$i: "; find $i -printf "%i\n" | sort -u | wc -l; done | |
# better way | |
find -maxdepth 1 ! -name . -type d -print0 | xargs -0I{} bash -c "echo -n '{}: '; find '{}' | wc -l" | |
function count_inodes() { | |
find $1 -maxdepth 1 | wc -l | |
} | |
# show used space / inodes by user quota | |
repquota -s /home|sort -k6 -n|less |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment