I’m a Mac OS X user and I’m trying to write and run a script that will alert me - or mail me via and inside terminal emulator - whenever a file is created, modified, or changed, for security purposes. I have no idea how to do it and how to start the script since everything on Mac is a bit different than on Linux, since it’s closed.
I know how I should do it if I want to use it on a certain directory, but I want it for all directories except log files put under
/var/log and I want it to tell me what’s been changed and where the change was. So checking the bit/bytes to determine the change is useless.
In fact, I want to beware of any change. I know I may face with thousands of changes, but I just want to be kept informed on whatever changing to be sure everything is in the normal situation. In other words, I want to monitor my system data on OS X.
Can anybody help me with this?