Sponsored Content
Full Discussion: File monitor and alert
Top Forums Shell Programming and Scripting File monitor and alert Post 302995548 by drysdalk on Friday 7th of April 2017 09:08:04 AM
Old 04-07-2017
Hi,

find could certainly be used in this scenario, yes. Here's a quick example based on a timescale of one minute, rather than one day, just to demonstrate the principal in action:

Code:
$ touch /tmp/testfile
$ find /tmp/testfile -mmin +1
$ sleep 60
$ find /tmp/testfile -mmin +1
/tmp/testfile
$

So the idea is to run your find command pointing directly at the file you're interested in, and specify your interval. So our example here is based on finding the file if it's been modified more than one minute ago via -mmin +1, but you could just as easily check for over one day with -mtime +1.

Hope this helps.
This User Gave Thanks to drysdalk For This Post:
 

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script to monitor files in a directory and sending the alert

Hi All, We are having important config files in an directory which was accessable by all /auto/config/Testbed/>ls config1.intial config2.intial config3.inital often we find that some of the lines are missing in config files, we doubt if some one is removing. I would like to write... (0 Replies)
Discussion started by: shellscripter
0 Replies

2. AIX

Alert: Network Status Monitor daemon (rpcstat) is not running

Hi I am currently testing SCOM2012 on my AIX systems for monitoring. I tested it on 3 systems and immediately i got the following errors: Alert: Network Status Monitor daemon (rpcstat) is not running Source: AIX 7.1 Path: (left blank) Last modified by: (left blank) Last modified time:... (3 Replies)
Discussion started by: jsabo40
3 Replies

3. Infrastructure Monitoring

Searching for Saas Monitor service which monitor my servers which are sitting in different providers

Sorry if this is the wrong forum Searching for Saas Monitor service which monitor my servers which are sitting in different providers . This monitor tool will take as less CPU as possible , and will send info about the server to main Dashboard. The info I need is CPU / RAM / my servers status (... (1 Reply)
Discussion started by: umen
1 Replies
alert(3alleg4)							  Allegro manual						    alert(3alleg4)

NAME
alert - Displays a popup alert box. Allegro game programming library. SYNOPSIS
#include <allegro.h> int alert(const char *s1, *s2, *s3, const char *b1, *b2, int c1, c2); DESCRIPTION
Displays a popup alert box, containing three lines of text (s1-s3), and with either one or two buttons. The text for these buttons is passed in `b1' and `b2' (`b2' may be NULL), and the keyboard shortcuts in `c1' and `c2' as ASCII value. Example: if (!exists(CONFIG_FILE)) alert(CONFIG_FILE, "not found.", "Using defaults.", "&Continue", NULL, 'c', 0); RETURN VALUE
Returns 1 or 2 depending on which button was clicked. If the alert is dismissed by pressing ESC when ESC is not one of the keyboard short- cuts, it treats it as a click on the second button (this is consistent with the common "Ok", "Cancel" alert). SEE ALSO
alert3(3alleg4), gui_fg_color(3alleg4), exgui(3alleg4), expackf(3alleg4), exspline(3alleg4) Allegro version 4.4.2 alert(3alleg4)
All times are GMT -4. The time now is 08:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy