Troubleshooting Disk Space Usage

A couple years ago, my coworker wrote a great post on finding disk space issues in Linux and how to resolve them. Helped me out this weekend when a critical server was having issues, so wanted to post it here:

http://www.randomlyexpressed.com/diagnosing-linux-disk-usage/



For future reference (after reading the post above)

Show filesystem usage:

~$ df -h

Show all files/directories consuming space:

~$ du -kx / | sort -nr | more

Show directories in current location:

~$ du -hc | sort -h
~$ du -hc --max=1 | sort -h #This limits your directory listing to one level

List files in directory:

~$ ls -larth

List files in directory sorted by size, ascending:

~$ ls -lSrh

List and then delete any .log file older than 7 days:

~$ find . -type f -name "*.log" -mtime +7 -print -exec rm -fr {} \;

Another easy way to reclaim space by removing unused dependencies:

For anyone exploring a character design, it is worth considering how details related to convention planning will affect the complete look. As fans study the source material, reviewing details related to Genshin Impact cosplay costumes also makes comfort and movement easier to judge. To compare practical details about details related to costume sizing, heat resistant cosplay wigs for school festivals can help narrow the options for a specific purpose. Before the preparation is complete, it is useful to check details related to character costumes against the wearer's own needs.

~$ apt-get autoremove