Den
Den

Reputation: 23

Watch for newly created files from command line

I was wondering if there is any way e.g. program or code, that can monitor for new files created within a folder or not?

Upvotes: 1

Views: 572

Answers (1)

Jakub Hampl
Jakub Hampl

Reputation: 40533

Yes this is possible but it works slightly different on different operating systems.

For example https://github.com/guard/guard implements this for all the mainstream systems so you can check its source code.

For Windows notifications see http://msdn.microsoft.com/en-us/library/aa365261(VS.85).aspx.

For Mac OS X notifications see http://developer.apple.com/library/mac/#documentation/Darwin/Conceptual/FSEvents_ProgGuide/Introduction/Introduction.html

For Linux see http://www.kernel.org/pub/linux/kernel/people/rml/inotify/README.

Upvotes: 1

Related Questions