Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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 at 12:04

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

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.