Ever noticed you're running out of room on a partition and you'd like to free up some space quickly that may be hidden in unused directories? Here's a quick and easy way using the
- Find the partition that's low on space and cd into it
du -sh * | grep Gto give a usage summary in human readable form and grepping out any dirs with a gigabyte or more
- Look at the results and see if there's any dirs you could remove, or go into further
- Repeat steps 2 and 3 until you've gone through the directory tree, removing any unnecessary files and directories
Sure it's only useful for large portions of space, but you could replace the G with an M to get more results. Searching for larger files over a gig is usually quicker and produces better results though.