I'd like to have a copy of a web site on my local drive. Then when I make changes to that copy, have those changes automatically updated on the site's server. Ideally I'd like to tell it to only do this for certain file types. Does anybody know of a way to do this with Linux?
|
feedback
|
|
You can use inotify-tools to do this. See the section "inotifywait example 1 (thanks to Nick Lothian)" for an example of doing what you describe using rsync. You may need to modify it to use ftp, or whatever, depending on your set up. It is a fairly trivial thing to check the file extension or use the EDIT: Also look at incron. It is an event based crontab rather than a time based crontab. Running things every minute, just in case something has changed, is not an ideal solution. | |||
|
feedback
|
|
In theory, there should be away to monitor certain folders for changes, and if changes are made, have a script to automatically transfer them to your web server (presumably via SCP or S/FTP). At worse, you (or find someone to do it for you) can write a script that checks modified times for certain folders and file types and have it automatically transfer the files for you. The script can be run in a cronjob about ever minute or so. | |||
|
feedback
|
