If you want to seamlessly sync two folders across two machines on the internet, you could use a lot of tools for the like sync. However if you want this syncing to take place whenever a file changes in the master (in a case where you have a master and a slave, where masters changes are propagated to slave), you can use Lsync. You can read more about it here (http://code.google.com/p/lsyncd/).
Here is how to get it installed on Ubuntu. This has been tested on version 9.10 and 10.04.
Download the latest version of synced
wget http://lsyncd.googlecode.com/files/lsyncd-2.0.3.tar.gz
Install the required packages
sudo aptitude install lua5.1 liblua5.1-0-dev pkg-config
Compile and install away
cd lsyncd-2.0.3
./configure
sudo make install
Test whether its installed
lsyncd -version
Thats it!




