how to use du to see files greater than a threshold size
Solution 1:
To only show folders over 1GB in size:
du -h --threshold=1G
You may also want to order by size, to easily find the biggest ones.
du -h --threshold=1G | sort -h
(Works on: Ubuntu/Mint.
Does not work on: OSX or RHEL 6.2)
Solution 2:
Use the find command instead. The following example will show you all files that are larger than 10 megabytes:
find -size +10M
You can use du with find like this to see the size of each file:
find -size +10M -exec du -sh {} \;
Solution 3:
I like the gt5 utility. It use the output of du
and creates a browsable listing of directories and their sizes and uses a text-mode browser such as links to display the information.
Both programs are available in the Ubuntu repositories: gt5 and links.