![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Find the age of a file in Minutes | hari_anj | Shell Programming and Scripting | 1 | 03-18-2008 06:22 AM |
| Find accessed file in past 1 or 2 minutes, and throw mail. | varungupta | UNIX for Advanced & Expert Users | 2 | 09-12-2007 03:07 AM |
| Find files on minutes basis | er_aparna | Shell Programming and Scripting | 3 | 07-16-2006 09:57 PM |
| only find files older than x minutes old | dsimpg1 | Shell Programming and Scripting | 1 | 05-18-2006 11:48 PM |
| finding files only minutes old? | cstovall | Shell Programming and Scripting | 2 | 01-12-2005 09:06 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi Friends,
i have to write a script to raise a flag if there are any files that are older than 15 minutes in the directory.The directory is supplied as the parameter to the script. please help with a sample script. Thanks in advance veera |
|
|||||
|
Please read the rules:
(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post where your goal is to get an answer more quickly. I have closed the duplicate thread. |
|
||||
|
This is cheesy, but meets the requirements (the right way would be to touch the file back 15 minutes)
Code:
#!/bin/bash
RCPT="username@domain.zzz" # This is who to mail the list to
touch /tmp/.adkojha
if [ "$1" = "" ]
then echo "Usage: $0 /path/to/dir"
exit 1
fi
cd $1
sleep 900
find . -newer /tmp/.adkojha | mail $RCPT
rm -f /tmp/.adkojha
|
|
|||||
|
Quote:
|
![]() |
| Bookmarks |
| Tags |
| linux, mtime |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|