Tux

...making Linux just a little more fun!

Folder Sync on Linux

Deividson Okopnik [deivid.okop at gmail.com]


Mon, 16 Mar 2009 17:31:53 -0300

Hello TAG!

Im doing some PHP coding on my machine, and I have apache running on another machine. I setup'ed a shared folder, and everytime i want to test something, I put it on the shared folder, then change to the other machine (on a KVM switch), and do "sudo cp -r * \var\www" and "sudo rm -r *" (on the shared folder of course), then switch back to my machine, and so on.

Question is - is there any simple way of automatizing that? I didnt want complex systems, I wanted something that detected when there is any file in the shared folder, then moved it to /var/www.

So, any of you got something that does that?

Thanks for the attention

Deividson


Top    Back


Thomas Adam [thomas.adam22 at gmail.com]


Mon, 16 Mar 2009 20:36:52 +0000

2009/3/16 Deividson Okopnik <deivid.okop@gmail.com>:

> Hello TAG!
>
> Im doing some PHP coding on my machine, and I have apache running on
> another machine. I setup'ed a shared folder, and everytime i want to
> test something, I put it on the shared folder, then change to the
> other machine (on a KVM switch), and do "sudo cp -r * \var\www" and
> "sudo rm -r *" (on the shared folder of course), then switch back to
> my machine, and so on.
>
> Question is - is there any simple way of automatizing that? I didnt
> want complex systems, I wanted something that detected when there is
> any file in the shared folder, then moved it to /var/www.
>
> So, any of you got something that does that?

inotify exists to do just that.

-- Thomas Adam


Top    Back


Michael Makuch [linuxgazette1 at makuch.org]


Mon, 16 Mar 2009 15:39:35 -0500

Deividson Okopnik wrote:

> Im doing some PHP coding on my machine, and I have apache running on
> [snip] other machine (on a KVM switch), and do "sudo cp -r * \var\www" and
> [snip] "sudo rm -r *" (on the shared folder of course), then switch back to
> Question is - is there any simple way of automatizing that? I didnt
>   

Why not just share your DocumentRoot or /var/www directly?


Top    Back


Deividson Okopnik [deivid.okop at gmail.com]


Wed, 18 Mar 2009 12:26:48 -0300

2009/3/16 Michael Makuch <linuxgazette1@makuch.org>:

> Deividson Okopnik wrote:
>
> Why not just share your DocumentRoot or /var/www directly?
>

Didnt want to do that at the start, but ended up sharing it with a password. Thanks :)


Top    Back