Skip to content

Instantly share code, notes, and snippets.

@hartfordfive
Created February 20, 2016 12:53
Show Gist options
  • Select an option

  • Save hartfordfive/6bd72f12787f8b276d19 to your computer and use it in GitHub Desktop.

Select an option

Save hartfordfive/6bd72f12787f8b276d19 to your computer and use it in GitHub Desktop.
Bash command to find large files
#!/bin/bash
DIR=$1
MAX_SIZE_BYTES=$2
echo "Last Modified, Size, File Path"
find ${DIR} -type f -size +${MAX_SIZE_BYTES}k -not -path "/proc/*" -exec ls -lh {} \; | awk '{ print $8 ": " $5 " " $9}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment