LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-13-2008, 08:59 AM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 31
find error


I have a directory that our applications are continuely generate new file to it , some files hv a word "error" in content , I would like to find out which file hv this word and send me notify mail to inform me which file hv this word , currently , I have a stupid script to grep the word , the script hv scheduled to run in every 2 hours , it works fine but I worry that if the system is shutting down while the cron job is time to run , then the error checking would be missed in this two hours, this would cause senior problem , furthermore , I am not sure if the checking is correct while the file is generating at the same time , can advise what is the best method , is there any method to check the directory instantly ? if possible , can provide the script ?

Thx in advance.
 
Old 01-13-2008, 10:22 AM   #2
ev0ltn
LQ Newbie
 
Registered: Jan 2007
Distribution: Gentoo, Fedora, Slackware .. Mac OS X?
Posts: 13

Rep: Reputation: 0
I reckon you could modify the shutdown (runlevel 0) / reboot (runlevel 6) scripts to run the same command cron is executing every two hours BEFORE the script starts shutting down the machine. I can't guarantee that it will work but I guess it's worth a try. Since you didn't feel like telling us the name of the distro you're using, you'll have to find those scripts yourself.

I'm not 100% sure I understood your problem correctly, though..

Last edited by ev0ltn; 01-13-2008 at 10:27 AM. Reason: Grammar, doh.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MPlayer error play 3gp files error: Cannot find codec for audio format 0x726D6173 hocheetiong Linux - Software 1 08-29-2008 12:49 PM
G++ How to find first error? borstIU Programming 3 08-02-2007 10:36 AM
find error in /proc BlueSpirit Slackware 7 10-14-2006 10:16 AM
error find bruse Linux - Newbie 2 03-13-2005 10:53 PM
How to find out an error number orlenok Linux - Newbie 2 10-05-2003 11:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration