You are herebatch

batch


Linux: Find large files

Finds all files over 20,000KB (roughly 20MB) in size and presents their names and size in a human readable format:

find / -type f -size +20000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }' 

The FOR Command

The FOR command is one of those commands that can save you hours of repetitive work. As a sysadmin its important to look for easy ways to get rid of repetitive tasks like renaming files or copying a select number of files. I recently had to retrieve 3,000+ files from a folder containing over 3,000,000 files. Imagine how long it would take to selectively find these files. The benefit of the FOR command is that it is a "looping" command. In other words, it will do a given task over and over until a given condition is met.