Have you ever wanted to know what is the largest folder or file on your hard drive?
The command find it's great, it allows us to do many things (we've already talked about some of them here), here I bring you another use of it.
The following command will search the entire HDD and tell us which are the 10 largest files or folders on the computer:
sudo find / -printf '%s %p\n'| sort -nr | head -10
If you want to know not just the biggest 10, but the 20 or something like that, just swap the last 10 for the desired one.
As I said before, this will count both folders and files, if you just want to take into account the folders would be to add -type d (d = directory):
sudo find / -type d -printf '%s %p\n'| sort -nr | head -10
On the contrary and want to see only the files and no folders would be -type f (f = file):
sudo find / -type f -printf '%s %p\n'| sort -nr | head -10
If you want to specify the type of file, that is, just take into account .mp4, just add an -iname "* .mp4":
sudo find / -iname "*.mp4" -printf '%s %p\n'| sort -nr | head -10
In my case the largest files I have are the virtual HDDs of my virtual servers with KVM+ Qemu, then a football video (presentation of Gareth Bale with Real Madrid) and other things.