The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
KSH to find a ORA error in a log file techbravo HP-UX 6 04-28-2008 06:24 AM
Error: could not find any of these C compilers cherryven AIX 2 07-01-2006 01:27 AM
error in a remote find annemar UNIX for Dummies Questions & Answers 5 05-29-2006 06:12 AM
ERROR in :-Find SUM of a particular column thiagoo Shell Programming and Scripting 4 02-06-2006 05:34 PM
Error when using if [ find ' berminator Shell Programming and Scripting 4 07-14-2005 06:41 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 01-12-2008
ust ust is offline
Registered User
 

Join Date: Feb 2005
Posts: 95
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.
Reply With Quote
Forum Sponsor
  #2  
Old 01-14-2008
sysgate's Avatar
Unix based
 

Join Date: Nov 2006
Location: /root
Posts: 1,200
Running the cronjob when, eventually, machine reboots or fails, is always present. Why don't you use "ls -l folder-name > file-names.txt" ; grep for error and mail the result ? Also, what is the OS, and what is the find option that you are using ?
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 01:33 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0