Skip to content

Instantly share code, notes, and snippets.

@sergiks
Created August 24, 2017 08:10
Show Gist options
  • Save sergiks/5588a63fb06d7c47a39cc2684290535b to your computer and use it in GitHub Desktop.
Save sergiks/5588a63fb06d7c47a39cc2684290535b to your computer and use it in GitHub Desktop.
Useful Linux commands
#!/bin/bash
# This will dump a list of every directory on the filesystem prefixed with
# the number of files (and subdirectories) in that directory.
# Thus the directory with the largest number of files will be at the bottom.
find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n
# Source: https://unix.stackexchange.com/questions/117093/find-where-inodes-are-being-used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment