0

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.)

ezuk
  • 313
  • 2
  • 4
  • 10

1 Answers1

1

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).

Wesley
  • 32,320
  • 9
  • 80
  • 116