Results 1 to 3 of 3
On server-1 ,a shell script runs and scp the tar files to /opt in server-2. Now I want to check specific directory( /opt ) in server-2 for new arrivals and ...
- 11-30-2009 #1
monitor directoriese : inotify or shell script while-true loop?
On server-1 ,a shell script runs and scp the tar files to /opt in server-2. Now I want to check specific directory( /opt ) in server-2 for new arrivals and process them.
I have found two ways of doing it,
use inotify simple C program watches /opt
or a shell something like
Which one is better?Code:while true; do sleep 30; ls -tr /opt| head -1 done
- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 12-02-2009 #2
- 12-09-2009 #3
yes,Robin I have used inotify
- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------


Reply With Quote