[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] my 1st shell script - chk big files
- Subject: [ale] my 1st shell script - chk big files
- From: jcpilman at gmail.com (John Pilman)
- Date: Sun, 20 Mar 2011 11:58:06 -0400
- In-reply-to: <[email protected]>
- References: <[email protected]>
> find / -type f -size +100M | grep -v /swapfile | grep -v /sys/devices |
> grep -v /proc >> file_list.txt
Instead of searching entire directories and then filtering them with
grep, you could exclude them from the search. That should speed
thongs up.
Find / -type f -path /sys/devices -prune -o -path /proc -prune -o
-size +100M |grep -v /swapfile >> file_list
...John