Displaying 1 result from an estimated 1 matches for "jagbir".
2010 Jan 26
10
Detect file change
Hello everyone!
How can I detect if a folder have changed (sync logic) than run a script
if it's true?
I found this script over the net, but I think it's such complicated for
that simple thing...
#!/bin/bash
############### detectdir.sh by Jagbir Singh #################
#
# script to detect changes in directory.
#
###############################################################
# directory to watch
DIR="/var/www/vhosts"
# store current statistics of dir
OLD=`stat -t $DIR`
while true
do...