I have configuration files in one directory. I want to get an alert if any of the existing files gets modified or any new configuration file is present in the directory.
There are different approaches possible for sure. One could be to get a kind of snapshot of the files you want to observe, maybe by the tool cksum and write that snapshot in some tmp file. Then, by cron, trigger that script every 10 minutes or whatever interval you'd like and get a new snap and compare it to the former snap in the temp file. If there is a difference, send a mail.