daily pastebin goal
61%
SHARE
TWEET

Untitled

a guest Jun 19th, 2017 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # What is the best (fastest) method of finding large files that will cause a directory (i.e. /usr) to go to 100%. I check for core dumps and log files immediately but there has to be a better way to find huge files quickly.
  2. # 3Thanks for any assistance.
  3.  
  4. #!/bin/sh
  5.  
  6. if [ $# -eq 2 ]
  7. then
  8. find $1 -type f -xdev -size +$(expr "$2" \* 2) -exec ll -d {} \;
  9. else
  10. echo "Usage : ${0##*/} "
  11. fi
  12. --snip--
  13.  
  14. Run it this way:
  15.  
  16. ./bigfiles.sh /var 5000
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top