Wit the following command I can find largest directory.
find <directory> -printf '%s %p\n' |sort -nr | head
But is there a way to find largest file within all the subdirectories in directory ?
Join Stack Overflow to learn, share knowledge, and build your career.
Wit the following command I can find largest directory.
find <directory> -printf '%s %p\n' |sort -nr | head
But is there a way to find largest file within all the subdirectories in directory ?
With the command you just gave, you get the largest file. If you want to summarize the size for each file recursively for directories you may want to use the `du' command.