Computing.Net > Forums > Solaris > script to monitor file size

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.

script to monitor file size

Reply to Message Icon

Name: nhgaar
Date: December 21, 2006 at 08:43:03 Pacific
OS: Solaris
CPU/Ram: 350/1gb
Product: Sun/Netra
Comment:

Hi All,

Can anyone please help with the following,

I'm trying to write a script(bash) that will:

1. constantly run in the background and monitor the size of a particular file.

2. When this file reaches a certain limit
it will copy the contents to a new file.

3. It will then write the original file to /dev/null

As mentioned above, this will be a constant process and every time the original file reaches its limit the contents will be written to a fresh new file.

As you can probably tell, I am new to scripting and I kind of have an idea of how to implement some of the above steps - But I don't know how it all fits together.

Any assistance would be greatly appreciated.

Thank you



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Solaris Forum Home


Sponsored links

Ads by Google


Results for: script to monitor file size

Script to Monitor some processes www.computing.net/answers/solaris/script-to-monitor-some-processes/4665.html

Script to dectect vi /etc/host file www.computing.net/answers/solaris/script-to-dectect-vi-etchost-file/2853.html

How to check the file size on DLT t www.computing.net/answers/solaris/how-to-check-the-file-size-on-dlt-t/2452.html