I have a webcam that works by re-uploading the same file and overwriting itself every 10 seconds. I’d like to create a shell script that monitors this file (camFile.jpg) and when it detects it’s been overwritten, it duplicates it and creates a new file called camFile-TIMESTAMP.jpg. Can anyone point me in the right direction?
Share
I think you’d be best served by using inotify. But it depends on which language you’re using.
http://linux.die.net/man/7/inotify