Skip to content

Instantly share code, notes, and snippets.

@sevkin
Last active May 3, 2023 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sevkin/6141a52ec0b57b6553ee53c0429379b3 to your computer and use it in GitHub Desktop.
Save sevkin/6141a52ec0b57b6553ee53c0429379b3 to your computer and use it in GitHub Desktop.
100% inodes used / no space left
# 1. search where is the most space use
for i in /*; do echo $i; find $i |wc -l; done
# or
for i in /var/*; do echo $i; find $i |wc -l; done
# 2. delete unused files (in my case php sessions)
# for i in /var/www/example.com/tmp/session/*; do rm $i; done
find /var/www/example.com/tmp/session/ -not -newermt "may 01, 2023" | xargs rm
# from https://serverfault.com/a/779641
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment