On linux, how to monitor the change of a file/directory, by system call or shell command?
<p>Under windows programming, there's win32 api that allow us to monitor the status of a file or a directory: when changed, there's event notification for a user callback function. E.g. when creating a directory in one explorer window, other explorer window related with this directory will also be refreshed.</p>

<p>My question: how to do this on linux? Does linux provide any sytem call or posix api or shell command to monitory a file/directory?</p>

<p>I know git can do it, but how does git made it?</p>

<p>Thanks!</p>