I\'m writing a bash script, and I\'d like to monitor file changes into a directory (adding, deleting and renaming) and performing different action accordingly.
Is th
Just an idea. If you are allowed to do it only in bash, then you can generate a md5sum on directory contents. Probably you can have file-name,modify-time,inode-modify-time etc in that directory.
You can use the inotifywait
command (assuming your distribution supports inotify, which most do):
inotifywait -m -r --format '%f' -e modify -e move -e create -e delete ~/test | while read line
do
echo "File: $line"
done