On Friday 22 June 2007 09:59, Hans Linux wrote:
> I need to synchronize the content of folders. Lets say I have 2 folders :
>
> - /home/hans/folder1
> - /home/hans/folder2
>
> Everytime I change something in folder1 like remove a file, create a
> file etc, folder2 will automatically be synchronized at once. how do i
> do that?

Hello Hans,
It depends on what you really want to achieve by "synchronize".
1. If you just want to make an 'impression' that anything happens in folder1 
will be 'synchronized' instantly to folder2, then you can mount --bind 
folder1 to folder2:
mount --bind /home/hans/folder1 /home/hans/folder2

2. But if you want to provide a backup function too, so that if anything 
happens in folder1, there is a backup available in folder2, you can use 
rsync:
rsync -a /home/hans/folder1 /home/hans/folder2
And put that command in crontab for to be running say.. 3 minutes.

HTH,
-- 
Fajar Priyanto | Reg'd Linux User #327841 | Linux tutorial 
http://linux2.arinet.org
12:53pm up 0:21, 2.6.18.2-34-default GNU/Linux 
Let's use OpenOffice. http://www.openoffice.org

Attachment: pgpum7F24NxLU.pgp
Description: PGP signature

Reply via email to