mifan Posted October 12, 2006 Report Share Posted October 12, 2006 I'm trying to get a folder on my hard drive and a folder on my usb drive to be the same. Is there a program the can check for the diffrences in the folders and copy the files to each folder as needed? Quote Link to comment Share on other sites More sharing options...
jboy Posted October 12, 2006 Report Share Posted October 12, 2006 rsync can do that quite nicely. See: https://mandrivausers.org/index.php?showtopic=26540 http://allyourtech.com/content/articles/14..._with_rsync.php Quote Link to comment Share on other sites More sharing options...
neddie Posted October 12, 2006 Report Share Posted October 12, 2006 Dumb question: what happens when you want to delete a file? If you delete it from one machine, and then rsync, it will copy it back again. If you delete it from the other machine, and then rsync, it will copy it again. I guess the only way to delete it is to make sure it's deleted from both sides before the rsync? Quote Link to comment Share on other sites More sharing options...
jboy Posted October 12, 2006 Report Share Posted October 12, 2006 Dumb question: what happens when you want to delete a file?If you delete it from one machine, and then rsync, it will copy it back again. If you delete it from the other machine, and then rsync, it will copy it again. I guess the only way to delete it is to make sure it's deleted from both sides before the rsync? That's a pretty smart question, actually. :D You could use the --delete option. See: http://www.linuxdevcenter.com/linux/cmd/cmd.csp?path=r/rsync --delete Before transferring files from a source directory, delete any files from the destination directory that do not exist in the source directory. Quote Link to comment Share on other sites More sharing options...
Mhn Posted October 12, 2006 Report Share Posted October 12, 2006 (edited) Dumb question: what happens when you want to delete a file?If you delete it from one machine, and then rsync, it will copy it back again. If you delete it from the other machine, and then rsync, it will copy it again. I guess the only way to delete it is to make sure it's deleted from both sides before the rsync? you can use the flag: --delete delete files that don't exist on sender Edit: Ooops jboy was faster Edited October 12, 2006 by Mhn Quote Link to comment Share on other sites More sharing options...
aerogate Posted October 12, 2006 Report Share Posted October 12, 2006 Krusader has excellent directory sync facilities Krusader Synchronizer This function compares the left and the right panel directories and shows the difference between them. After selecting some options and the Compare function you can synchronize the files and directories. One panel could be an FTP server. Don't forget the Compare by content option if the file size stays equal. Choose Commands->Synchronize Directories or Ctrl+Y to start this feature. The colors are configurable. Quote Link to comment Share on other sites More sharing options...
coverup Posted October 12, 2006 Report Share Posted October 12, 2006 I have been using unison for this job for many years. It allows one to preview and correct the suggested synchronization. I.e., if a file was deleted/modified in one of the directories, you can decide whether you wanmt to delete/update it in another diresctory, or restore the original version. Quite handy. Dumb question: what happens when you want to delete a file?If you delete it from one machine, and then rsync, it will copy it back again. If you delete it from the other machine, and then rsync, it will copy it again. I guess the only way to delete it is to make sure it's deleted from both sides before the rsync? Quote Link to comment Share on other sites More sharing options...
neddie Posted October 13, 2006 Report Share Posted October 13, 2006 You could use the --delete option.Yeah, sure, but if you have a cron job set up to automatically run this rsync every night (in both directions, without the --delete option) then things will automatically get restored every time the rsync runs. I like the sound of that interactive sync, where it gives you the choice. Also kdiff3 has some good compare functions, that's very useful for checking what's changed between two file trees. I don't use it for syncing but just for comparing. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.