Skip to content

Instantly share code, notes, and snippets.

@insanedefaults
Created July 15, 2015 01:54
Show Gist options
  • Save insanedefaults/69a814f6ab5b5fd257a8 to your computer and use it in GitHub Desktop.
Save insanedefaults/69a814f6ab5b5fd257a8 to your computer and use it in GitHub Desktop.
Count inodes in style
function inode_counter() {
#give me a path
#i'll count the inodes recursively
#I'm pretty slow, but I'm real purdy
path=$1
z=0
find $path 2>/dev/null | while read x
do ((z++))
printf '\r%-16s %-8s' "$install" "$z"
done
unset z
echo
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment