--- title: find large files date: 2012-03-14 subtitle: find large files under current mount point keywords: [unix, linux, shell] --- a small script to find large files under current mount point, useful in linux, probably works in bsd and generic unixes: #!/bin/bash #20091201:dmarsh:find large files under current mount point #20100413:dmarsh:changed echo cmd to print -u2 so message goes to stderr set -e set -u cmd="/usr/bin/find . -type f -size +1048576c -exec /usr/bin/du -sk {} \; 2>/dev/null | /usr/bin/sort -n" print -u2 ${cmd} eval ${cmd}