LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-21-2008, 07:00 AM   #1
devnull0
LQ Newbie
 
Registered: Jul 2007
Location: GA
Distribution: LFS
Posts: 23

Rep: Reputation: 15
Post Copying directories of files with differences


Hi I have 2 computers. I like to keep the home directories of the machines synchronized. I have put the hard drive of one into the other (yes, I know I could've used NFS or something, the first is broken right now). I have two directories, /home and /mnt/hdd.home . I would like some program to compare all files, if a file is in /home and not in /mnt/hdd.home, copy it over, and vice versa. If a file is changed in both places, copy them over to a temp directory and let me do it manually. Is there any tool to do this manually for me? If it matters, some files are binary, will that change it?
 
Old 04-21-2008, 07:07 AM   #2
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Rep: Reputation: 33
rsync will do exactly what you want.
 
Old 04-21-2008, 07:09 AM   #3
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
well, you could use diff and patch on the home directory... but there is always cp -au ... oh, and rsync
 
Old 04-21-2008, 07:53 AM   #4
devnull0
LQ Newbie
 
Registered: Jul 2007
Location: GA
Distribution: LFS
Posts: 23

Original Poster
Rep: Reputation: 15
Smile Thanks!

Ok, thanks, I guess rsync it is , I'll look it up. Thanks!
 
Old 04-21-2008, 01:09 PM   #5
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
In /home are many user application settings. If the same application is of a different version from one to the other, you may have issues trying to boot into those users accounts if you plan to re-boot into them after altering these files by using the settings from the other drive/user. You may want to exclude hidden files and directories where these settings are stored.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying files and sub-directories of a directory except the directories named ".abc" sri1025 Linux - General 2 08-24-2010 08:53 AM
Copying Directories using cp -r astrollama Linux - Software 2 10-20-2006 01:15 AM
drastic speed differences on copying on hard disks lsu420luv Linux - Hardware 2 04-17-2006 10:50 AM
copying multiple different files in different directories with identical file names nickleus Linux - Software 4 03-09-2006 01:25 PM
Copying linked files, replacing directories in bash scripts? ta0kira Programming 2 10-10-2004 04:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration