a week ago, i ran this db insert-heavy script on a server and forgot to turn off mysql
‘s binlog feature first. the result, of course, is that i filled up the disk in about three minutes and brought the whole server down. not great for a tuesday. fortunately, finding and fixing the problem was straightforward. the downtime was only a couple of minutes.
in this post we’re going to go over inspecting our disk space; figuring out how much we have left and finding out what we spent all those blocks on. we’ll look at three basic tools:
df
for inspecting disk space
du
for getting directory sizes
find
for finding files to delete these all come pre-packaged with your linux or linux-like operating system, so put that apt
back in your pocket.