Register
It is currently Sun Nov 23, 2014 6:16 am

Check to see when file size has stopped growing


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Thu Oct 07, 2010 8:59 am   

Joined: Thu Oct 07, 2010 7:47 am
Posts: 1
Im somewhat new to bash scripting so bare with me here.

What I have is a script that is dependent on when a certain file has finished populating with data. I would like to run the script only after this certain file has finished being modified/size has stopped growing indicating that that part has finished.

Im thinking maybe some how checking for this file, and checking the size or last modified time to indicate that I can kick off the second part of this process.

Could someone help me with how I would go about doing this?

Thanks!


Top
 Profile  
 PostPosted: Fri Oct 08, 2010 6:45 am   
User avatar

Joined: Tue Apr 27, 2010 2:28 pm
Posts: 172
Location: Czech Republic
Are you sure checking the file size growth is the right way to go? What if the populating program get paused for a reason (swapping maybe)? Is not there a better way to check whether the other program finished?
You may also try
Code:
lsof
on the growing file.


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP