Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been looking for a program that can sync arbitrary folders (so not dropbox) between a 32bit laptop and a 64bit desktop (so not unison without pain) and have it skip over files that have an ELF header.

I looked at hacking on csync2 for a few hours but the source is impossible to follow and I gave up.

Anyone know a good solution to this?

share|improve this question
Won't rsync do? – terdon Feb 16 '13 at 23:27
up vote 1 down vote accepted

If you're comfortable with coding, you could try hacking this into the Unison source code, or you could write a small program that:

  • goes through all files before launching Unison
  • store a list of all files with applicable ELF headers (or just check for files with the execute flag)
  • edit the existing unison profile to add all the detected files to the ignore list (see the manual)
  • launch Unison using the newly generated profile

The above would be trivial to create using a scripting language (e.g. Python), and you could wrap it all up nicely to automatically launch & sync via Unison after generating the ignore lists.

Unfortunately, you'd have to do this on both machines, since realistically there is no other way to only do this on one machine (otherwise, you'd still have to transfer all the files via the network, and then perform header checking on the host - and this would certainly require some modifications to the Unison source code).

share|improve this answer
33000 lines of ocaml will be no fun to dive into, and unison can't do sync between 64bit + 32bit without some shoehorning – Mike Feb 16 '13 at 20:58
@Mike what do you mean? Unison is both platform and architecture independent, it should work fine between a 32-bit and 64-bit platform... And even if Unison did happen to give troubles, why not just run the 32-bit binary on your 64-bit system? (although I again reiterate, it seems to work just fine for me) Also, what do you mean by "shoehorning"? – Breakthrough Feb 16 '13 at 22:43
1… - bah I misinterpreted the end of the first section and now I actually tried it everything works fine. The scripted solution is definitely good enough, and you can run it on both ends with some ssh trickery before syncing. thanks! – Mike Feb 17 '13 at 1:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .