|JP Vossen on 20 Apr 2011 22:38:30 -0700|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|Re: [PLUG] Merging home directories|
Date: Wed, 20 Apr 2011 20:04:20 -0400 From: Gordon Dexter<firstname.lastname@example.org> I have the unenviable task of merging 5 different home directories from three different computers, spanning 5 years, and I was wondering if there was any tool that might simplify things. My eventual goal is to have one unified, well organized home directory that is versioned (e.g. via Git) and synced between multiple computers. The last few times I've moved or upgraded I just put the previous home directory as a subfolder of the newer one, so on one computer I have /home/gdexter/old_gdexter/older_gdexter and I haven't even gotten around to doing that on my newest computer. This is compounded by bad habits such as putting things on the desktop if I don't know what to do with them. I'd rather not lose anything, of course, but I'd also rather not go through each homedir item by item and manually copy or merge things. Are there tools that help you with this sort of thing? Any suggestions to save my sanity?
Ouch. First, MAKE A BACKUP!!! Then, go through and nuke or move anything obvious.My next thought is to recursively md5sum all the files, then pick out and remove the dups, to trim it down. (Yeah, I know md5 is old and broken but it's good enough for this and reasonably fast.) That'll be ugly to impossible without some command line and script knowledge though.
After that, there are some GUI tools. Meld will help compare dirs. Unison will probably do that too, though it is really intended for merging a local to a remote dir.
meld - graphical tool to diff and merge filesunison-gtk - A file-synchronization tool for Unix and Windows with GTK+ interface
xsel - command-line tool to access X clipboard and selection buffersI've also used spreadsheets to do stuff like that. You can paste file names into columns, and match things up. 'ls -1 | xsel -bi', flip to a spreadsheet and paste.
Once I have a spreadsheet, I sometimes use formulas to create commands (like rm or mv) then paste those into a script to run all at once. That also gives me an audit of what I did, or it lets me do something similar when I mess up, restore the backup, fix my mistake, and try again.
Watch out for hidden "dot" files that may fly under the radar of some tools. Good luck, JP ----------------------------|:::======|------------------------------- JP Vossen, CISSP |:::======| http://bashcookbook.com/ My Account, My Opinions |=========| http://www.jpsdomain.org/ ----------------------------|=========|------------------------------- "Microsoft Tax" = the additional hardware & yearly fees for the add-on software required to protect Windows from its own poorly designed and implemented self, while the overhead incidentally flattens Moore's Law. ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug