I have a special file that I edit daily, it is somewhat like a large text file but a little more to it then that. I have a copy on my main desktop and a copy of the file on a USB drive as well. I would like a way to open up either file (from the USB drive or from my desktop drive) and be able to edit and save the file and have it stay updated on both drives. What is a lightweight and easy method of doing this? I do not need anything fancy
4 Answers
The well-known and widely-used rsync has a --update
switch that:
forces rsync to skip any files which exist on the destination
and have a modified time that is newer than the source file.
This allows you to modify either the local version or the version on the usb drive and then you can run:
$ rsync -au local_file /media/usb/file
$ rsync -au /media/usb/file local_file
This will ensure that both files will be at the latest revision.
rsync
has been ported to windows too.
On windows, I used syncback (http://www.2brightsparks.com/downloads.html) to do backup and filesync between to machines.
You might consider using dropbox (https://www.dropbox.com/). It's not what you are directly asking for, but it might meet your underlying need of file access from multiple places.
If it's a plain text file (not an Office document or similar), there are version control systems such as git
or hg
(mercurial).
~/notes$ git init; git add foo.txt ~/notes$ git commit -m "Initial commit" /media/usb$ git clone ~/notes
-
2git is a full-featured version control system...I'm not sure it would be what OP wants. It's a bit hard to learn for something as simple as syncing a single file.– marcuswMay 16, 2010 at 13:27