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

Popular posts from this blog

HAproxy logging

teamcity Automatic Agent Start under Linux

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all