11-24-2011
3,
0
Join Date: Nov 2011
Last Activity: 6 January 2012, 3:57 PM EST
Posts: 3
Thanks Given: 0
Thanked 0 Times in 0 Posts
Need a nice logic
Hi all,
Given a scenario there is a folder and files will be coming into the folder at random time.The files that came in need to be mailed. And an important thing no file should be missed out as well as no file should be sent twice.
One idea is that we can schedule a script that runs for every 30 mins and does this. But as -mmin is not a standard option, using -mmin to find the files modified in last 30 mins is not good.
Had one more idea, that is can have a log file that has the contents of the the files that has been mailed. Can get the list of files that has been modifed after the log file with -newer optin with find and mail them.For the first just run the script and it'll will create a empty log file and nothing will be mailed for the first time.
any suggestions..?