Friday 12 June 2015

Find the largest files on you Mac (Clean up you Mac)

There are lots of complicated applications for this you can download, but really the easiest and cleanest way is with these 2 commands that can be run from a Terminal window:

This one finds all files above 100MB and prints them out with the largest files at the end (so you can deal with them first):


find / -size +200000 -ls 2>/dev/null | awk '{for (i=1; i<=NF-4; i++) $i = $(i+4); NF-=4; print}' | sort -n

Feel free to change the threshold to include more or fewer files just change the +200000 in the script.

The second command just prints the largest folders with the largest at the end:

du -k / 2>/dev/null | sort -n

One interesting thing I found was how much space was wasted by Garage Band an application that I will never use.

No comments:

Post a Comment