[opensuse] synchronizing 2 folders

2007-06-21 Thread Hans Linux
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?
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] synchronizing 2 folders

2007-06-21 Thread Fajar Priyanto
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


pgpum7F24NxLU.pgp
Description: PGP signature


Re: [opensuse] synchronizing 2 folders

2007-06-21 Thread jpff
> "Hans" == Hans Linux <[EMAIL PROTECTED]> writes:

 Hans> I need to synchronize the content of folders. Lets say I have 2 folders :
 Hans> - /home/hans/folder1
 Hans> - /home/hans/folder2

 Hans> Everytime I change something in folder1 like remove a file, create a
 Hans> file etc, folder2 will automatically be synchronized at once. how do i
 Hans> do that?

You could run the command
rsync -auHv --delete /home/hans/folder1 /home/hans/folder2
every minute or so from a cronjob, or even continuously in a loop?

==John ffitch
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] synchronizing 2 folders

2007-06-22 Thread Carlos E. R.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


The Friday 2007-06-22 at 12:53 +0700, Fajar Priyanto wrote:

> 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 --del

> And put that command in crontab for to be running say.. 3 minutes.

I wonder if there would be an easy way using 'famd' instead.

- -- 
Cheers,
   Carlos E. R.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Made with pgp4pine 1.76

iD8DBQFGe6QotTMYHG2NR9URAiOzAJwLyopL2gl4F3W8EQKSNIhgUZK5wACeOIUD
hsoOs14UQ3xndfWpp2zS6wU=
=T5fZ
-END PGP SIGNATURE-

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] synchronizing 2 folders

2007-06-22 Thread James Knott
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?
>   
You could create a link from one folder to the other.  That way, you
have one folder appearing as two.

-- 
Use OpenOffice.org 
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] synchronizing 2 folders

2007-06-22 Thread Carlos E. R.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


The Friday 2007-06-22 at 07:27 -0400, James Knott wrote:

> Carlos E. R. wrote:
> >
> > > And put that command in crontab for to be running say.. 3 minutes.
> >
> > I wonder if there would be an easy way using 'famd' instead.
> >
> What's "famd"?

RTFM ;-)

Sorry, couldn't resist. O:-)

] DESCRIPTION
]
] FAM, the File Alteration Monitor, is a subsystem that applications 
]   can use to be notified when specific files or directories are changed.  
]   It is intended as a replacement for mechanisms such as poll and 
]   select.
]
]   FAM comes in two parts: famd, the daemon that listens for requests 
]   and provides notifications, and libfam a library that client 
]   applications can use to communicate with FAM.  For further information 
]   on libfam, see the fam(3) manual page.

It is running on suse systems by default.

- -- 
Cheers,
   Carlos E. R.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Made with pgp4pine 1.76

iD8DBQFGe7adtTMYHG2NR9URApRYAJ9qDJIR/P1D+vpdVOy+9tgl8xM10gCeKTAd
ZIuWrs2grZnz9CQPt2DPdyQ=
=ef/N
-END PGP SIGNATURE-

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] synchronizing 2 folders

2007-06-22 Thread James Knott
Carlos E. R. wrote:
>
> > And put that command in crontab for to be running say.. 3 minutes.
>
> I wonder if there would be an easy way using 'famd' instead.
>
What's "famd"?
-- 
Use OpenOffice.org 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] synchronizing 2 folders

2007-06-22 Thread John O'Gorman
On Fri, 2007-06-22 at 13:46 +0200, Carlos E. R. wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> 
> The Friday 2007-06-22 at 07:27 -0400, James Knott wrote:
> 
> > Carlos E. R. wrote:
> > >
> > > > And put that command in crontab for to be running say.. 3 minutes.
> > >
> > > I wonder if there would be an easy way using 'famd' instead.
> > >
> > What's "famd"?
> 
> RTFM ;-)
> 
> Sorry, couldn't resist. O:-)
> 
> ] DESCRIPTION
> ]
> ] FAM, the File Alteration Monitor, is a subsystem that applications 
> ]   can use to be notified when specific files or directories are changed.  
> ]   It is intended as a replacement for mechanisms such as poll and 
> ]   select.
> ]
> ]   FAM comes in two parts: famd, the daemon that listens for requests 
> ]   and provides notifications, and libfam a library that client 
> ]   applications can use to communicate with FAM.  For further information 
> ]   on libfam, see the fam(3) manual page.
> 
> It is running on suse systems by default.
Not on my OpenSUSE 10.2

I'd never heard of it before. I checked and found you man page.
But no output from the command: ps -e | grep fam 

John O'Gorman
> 
> - -- 
> Cheers,
>Carlos E. R.
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.5 (GNU/Linux)
> Comment: Made with pgp4pine 1.76
> 
> iD8DBQFGe7adtTMYHG2NR9URApRYAJ9qDJIR/P1D+vpdVOy+9tgl8xM10gCeKTAd
> ZIuWrs2grZnz9CQPt2DPdyQ=
> =ef/N
> -END PGP SIGNATURE-
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] synchronizing 2 folders

2007-06-22 Thread Mike McMullin
On Fri, 2007-06-22 at 07:27 -0400, James Knott wrote:
> Carlos E. R. wrote:
> >
> > > And put that command in crontab for to be running say.. 3 minutes.
> >
> > I wonder if there would be an easy way using 'famd' instead.
> >
> What's "famd"?

  File Access Monitoring Daemon?  IIRC it's been discussed on the list a
few times.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] synchronizing 2 folders

2007-06-24 Thread Richard Bos
Op vrijdag 22 juni 2007 04:59, schreef Hans Linux:
> 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?

Perhaps unison:
http://www.cis.upenn.edu/~bcpierce/unison/

-- 
Richard Bos
Without a home the journey is endless
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] synchronizing 2 folders

2007-06-24 Thread Carlos E. R.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


The Sunday 2007-06-24 at 11:24 +0200, Richard Bos wrote:

> Op vrijdag 22 juni 2007 04:59, schreef Hans Linux:
...
> > 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?
> 
> Perhaps unison:
> http://www.cis.upenn.edu/~bcpierce/unison/

It comes with the distro. But it is not automatic, AFAIK.

- -- 
Cheers,
   Carlos E. R.
El 2007-06-24 a las 11:24 +0200, Richard Bos escribió:
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Made with pgp4pine 1.76

iD8DBQFGfj7ptTMYHG2NR9URAj9ZAJ9/8bGeYRtQAX0PLQWO9FVdgaq1bQCfSQEv
L9iKmZrl6IilWWXAusc+gUI=
=kJOU
-END PGP SIGNATURE-