ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I just purchased a laptop and installed Ubuntu 5.10 on it. I'm a writing student and looking forward to being able to write wherever I am. That said, I also have a desktop machine that I have been using up until now. I keep all my writing in a folder on my desktop.
I'd like, if I could, to have a cron job on the notebook that would synchronize the desktop folder on my windows machine with a folder on my notebook. Basically both directories would contain the same files, and the script would compare timestamps between the two machines' copies and determine if it should copy a file from one machine to the other when it found a difference.
I already have SMB filesharing going between the two, and the appropriate drive from the Windows machine has been mounted using smbfs into the /mnt directory of my laptop so I can access it.
My two questions are, is there already a tool to sync two directories like this? And if not, would you write this as a perl script or is there a newer language that would be more suited?
Sorry if this is a little off-the-wall, but it's been a long time since I did any coding on a non-MS platform.
Thanks for the tips. I've installed unison using Ubuntu's package manager and it seems to be working great. I looked at rsync, but it seemed to be more of a one-way solution whereas unison will compare timestamps and do merges and so forth in bidirectional fashion, whic is what I'm looking for.