Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Running Ubuntu 13.10, editing files locally. Staging server is online. No git or anything - I just need to edit a file locally, save it, upload it, and see what it does on the server.

Looking for a directory watcher that will detect a file was changed and upload it to the server.

Any ideas on how I can do this?

(No git etc. -- that's coming, but not so fast as this isn't my own project.)

share|improve this question
up vote 1 down vote accepted

In simple, broad strokes: You'll be looking to inotify to watch for changes and then trigger a script in your shell or language of choice to do your bidding. You could also do something more complex and heavy such as running a cron job that checks the dates of existing files and performs a bit of logic to determine if a file was changed since the last run, and then take action (again, using the shell/script/interpreter of your choice).

share|improve this answer

protected by Tom O'Connor Feb 13 '14 at 12:04

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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