0

Say I have a program being run on multiple computers all on the same network (and all on the same account). Every once in a while the program needs to read/write a file save.dat. The actual file itself isn't important, more so is it's contents (just 3 seperate numbers that need to be kept track of).

As soon as the file is updated, the other computers should see that it has updated too. I.e. The program will read it and won't see that it is an old copy.

What way could I go about having these programs all accessing this constantly updating file? Perhaps some website (like pastebin)?

2

Set up one of the machines as an NFS server and let it serve an NFS share to the others. Let the file live on that shared network filesystem.

This is a fairly common solution for e.g. sharing home directories between many client machines from a file server.

You will be able to find more information about how to do this on the web, along with tutorials for how to set up NFS servers. This is done slightly differently depending on what flavour of Unix you may be using.

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.