If you want to find the largest top files and directories on Linux you can use this command
du -a / | sort -n -r | head -n 10
First we use du
. It shows the disk usage of your system (files and directories). Next we use the command sort
to sort the results by their numerical values -n
and in reverse order -r
. And last, we use head
to limit the output to 10 lines