(I'm assuming Linux here)
You can write code to get notifications when there are modifications to a directory but I don't know of a way to get notifications when someone enters it. Though, what would be the point? If you are concerned with those who saw what was in there you'd also need to be notified on other situations ( ls -l comes to mind).
Even if you modified cd itself to do the logging, what happens in other situations like pushd , or ln -s to that directory?
Monitor the parent directory. Entering the target directory modifies atime, so watching for IN_ATTRIB pretty much accomplishes the task.
Is there some facility that does this for you - as in you can request asynchronous notification - or are you suggesting a hand-rolled solution? F_NOTIFY has DN_ACCESS and DN_ATTRIB but they dont seem to work for me on just cd into the directory (or subdirectory). I'd be interested in what you are suggesting.
Try Dtrace. You shoudl be able to add some hook into kernel to monitor directory access and log if the directory in question == xyz.
Only port for linux I saw was from CRiSP available here.
Check status.txt for compatibility with your OS/version.
If you can make it run, then attached example (downloaded from here) can help you find how to write a script that will do what you want.
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...