Tony Godshall wrote:
According to kamaraju kusumanchi,
Vincent Smeets wrote:
Hallo,
is there some tool to synchronize files or directories between a hard
disk and a USB stick? I have some files on the hard disk of my home
computer. I have a copy of them on a USB stick so that I can use the
files at other places (at work) too. I need to keep those two copies
in sync, sometimes the USB file are changed, sometimes the HD files.
On Windows I used a "Workmap" directory on the USB stick. It showed a
button in the explorer to synchronize the files and Windows checked
which one was the newest version. Now I have left Windows and switched
over to Debian, but I still have the files on the stick and HD that
need to be synchronized. Is there some tool in Debian for that?
Thanks,
Vincent Smeets
rsync -avzp source-address destination-address
will make sure that the files in source are also there on destination.
It is not exactly what you want but it does half the job.
-u will make sure that newer overwrites older, not vice
versa (warning- make sure clocks are right!- I don't do this
till I'm sure ntpd is running on the machines).
and by source-address and destination-address you of course
mean path-to-file-or-directory in this context (though of
course one of the other can also be prefixed [EMAIL PROTECTED]:
which implies ssh transport).
rsync won't sync deletions though- unison's probably better
if you want that.
rsync does sync deletions.
[EMAIL PROTECTED]:~$ rsync --help|grep delete
--del an alias for --delete-during
--delete delete files that don't exist on the sending side
--delete-before receiver deletes before transfer (default)
--delete-during receiver deletes during transfer, not before
--delete-after receiver deletes after transfer, not before
--delete-excluded also delete excluded files on the receiving side
--ignore-errors delete even if there are I/O errors
--max-delete=NUM don't delete more than NUM files
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]