I am looking for a way to make a program in C or C++ that detects if there was any files altered, renamed, moved or deleted in a specified directory for Linux systems. Is there a way to do that?
You want inotify (and its man page.)
Look into inotify, I think it's still current.
You can also use a wrapping API, such as glib's GIO GFileMonitor.
Program against FAM. On current Linux systems this service is provided by gamin or a similar application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With