Find the largest file in a directory and its subdirectories | find -type f -exec du -Sh {} + | sort -rh | head -n 5
Find the largest file in a directory and its subdirectories using the find command
Type the following GNU/find command:
## Warning: only works with GNU find ## find /path/to/dir/ -printf '%s %p\n'| sort -nr | head -10 find . -printf '%s %p\n'| sort -nr | head -10 |
find -type f -exec du -Sh {} + | sort -rh | head -n 5
Comments
Post a Comment