Finding the biggest files in Linux

Published On: 2011-10-07

Category: News

The code:
find . -printf '%s %p\n' | sort -nr | head
The breakdown: find . (searches for all files within the current directory and subdirectory) -printf '%s %p\n' (prints out the size and path followed by a return) | sort -nr (pipe that into sort which then sorts by numeric in reverse order) | head (display the first 10 lines of the resulting list)