Skip to content

Instantly share code, notes, and snippets.

@mdpuma
Last active July 15, 2017 10:35
Show Gist options
  • Save mdpuma/497d6f46b052e9339e64 to your computer and use it in GitHub Desktop.
Save mdpuma/497d6f46b052e9339e64 to your computer and use it in GitHub Desktop.
#!/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