Watch a directory for files with a pecific pattern

I dont know if this possible. I need to watch a directory and if any file gets appeneded with a particular entry say, nologin.php, we should get output of that.

Creating a new file in a directory or removing a file from a directory will update the timestamps on that directory. Modifying the data in an existing file in a directory will not cause any visible change to the directory itself.

What operating system are you using? Several operating systems have non-standard methods of monitoring files that might help you efficiently identify files that need to be checked for the particular entry you're trying to find.