Logs results to $HOME/LARGEFILES-$(date -u +%b-%d-%Y).log
(one log per day/UTC).
To run, first make executable: $ sudo chmod +x getlogLargeFiles.sh
Then run from current directory:
- with sudo:
$ sudo ./getlogLargeFiles.sh
- or as root:
# ./getlogLargeFiles.sh
To list larger size files only, simply edit the "-size" parameter, for example to search for 500MB+ files, do:
find / -xdev -type f -size +500M -exec ls -lah {} \; | sort -k 3,3 -k 5rn | awk '{print $5,$3,$4,$9}' | tee $LOGFILE
Enjoy!