Computing.Net > Forums > Linux > Colecting a directory size, email an alert

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Colecting a directory size, email an alert

Reply to Message Icon

Name: Chaudry
Date: July 1, 2009 at 10:07:46 Pacific
OS: Windows XP
Subcategory: Software Problems
Comment:

Here is what i have so far:
export DataCollectDirSize=`du -k /opt/trey |awk '{print $1}'`

echo 'My Directory size is :' $DataCollectDirSize 'KB'

if [ $DataCollectDirSize -gt 256000 ] ## 250 MB ##

then

How to send an email that the size over the threshold?



Sponsored Link
Ads by Google

Response Number 1
Name: tvc
Date: October 4, 2009 at 07:26:06 Pacific
Reply:

What's the Linux you're using ?


0
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Colecting a directory size, email an alert

add a directory to the PATH www.computing.net/answers/linux/add-a-directory-to-the-path/21240.html

Reset Directory Size in Linux www.computing.net/answers/linux/reset-directory-size-in-linux/28150.html

Command to locate a directory www.computing.net/answers/linux/command-to-locate-a-directory/11114.html