|
Cron job to sync two directories
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.
|