1822143 Members
3721 Online
109640 Solutions
New Discussion юеВ

Monitoring File Size

 
SOLVED
Go to solution
sathish kannan
Valued Contributor

Monitoring File Size

Hi Guys,
I need to search a filesystem for files which has size more than a 1Gig and mail it to me. Could any one help me ?

ta
Cheers
Sathish
Don't Think too much
6 REPLIES 6
James A. Donovan
Honored Contributor

Re: Monitoring File Size


find / -type f -a size +1000000000c |mailx -s "Big Files" who@cares.com
Remember, wherever you go, there you are...
Chris Vail
Honored Contributor

Re: Monitoring File Size

find . -type f -size 1000000000 |mailx -s "Large Files" me@wherever.com


Sridhar Bhaskarla
Honored Contributor

Re: Monitoring File Size

HI Sathis,

Add -xdev so that it won't traverse into the mount points under this filesystem.

find /filesystem -xdev -type f -size 1000000000c|mailx "1 GB files" yourname@yourdomain.com

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Michael Steele_2
Honored Contributor
Solution

Re: Monitoring File Size

Everyday at 1:00 AM

00 1 * * * find / -type f -size +1000000000c |mailx -s "1 gig Files" sathish@yourcompany.com
Support Fatherhood - Stop Family Law
sathish kannan
Valued Contributor

Re: Monitoring File Size

Thanks for all your contribution and Fredrick's "find" option works better.

jim's option give me bad syntax error.
Whereas Sridhar's and Chris option found files only if its size is 1GB. But I need to get list of files more than a Gig. Hence I gave 10 points to Fredrick and rest 2.

Cheers
Sathish
Don't Think too much
sathish kannan
Valued Contributor

Re: Monitoring File Size

Thansk for all your help
Don't Think too much