1

I have a windows XP machine, and on this i'm running a weather station. The software updates several files in a folder.
This folder is mounted via samba on the webserver(debian)

I wan't to monitor the mounted folder, and when it detects any change, it copies this file to another location on the webserver. some of the files changes every few seconds.

Hope i described the problem clear enough.

Rgrds Bengt

2

You can make some shell scripts for doing that, but maybe the easiest way is managing to get a rsync process syncing the folders. Can rsync have some problems with NTFS, but the shell scripting solution remains.

  • Got any leads on how to make this script. I'm not a linux expert. Dabble abit in programming. But that is limited:) – Bengt Danielsen Gullbrå Jul 2 '13 at 10:12
  • It would be done from the Debian host. To monitor the mounted folder, you can use something like until false; do rsync <args>; sleep <time>; done. If rsync does not make it, you can combine Bash if and while sentences with the find command and emulate the syncing. But then take into account that before processing a document you have to be sure that it has already been completely processed by every other process that is meant to process it. For instance you should not start reading a document until the process which is creating it ends. – 41754 Jul 2 '13 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.