1

I have a question about the file synchronizer, unison. Is there a way to let unison compare two replicas and output the difference (to the standard output or a file) but not execute any updates?

I could do this by just hitting / (skip) for each update possibility in the interactive session, but I have more than a thousand lines of possibilities and lost patience to hold the / key for a long time. Is there a way to skip all automatically?

norio
  • 3,652
  • 3
  • 25
  • 33

1 Answers1

1

I don't know if this is a practical solution for you, but if you run Unison in text mode (unison -ui text), you can get an overview of all content to be transmitted by typing an upper-case L at the prompt (when it's ready to reconcile the changes). Perhaps you could automate this using expect?

Edward
  • 486
  • 4
  • 14
  • Thank you for the answer. `L` key looks useful in my case, indeed. Can you tell me about `expect`? Is it an option of unison? – norio Jul 05 '22 at 18:57
  • @norio, no, [expect](https://linux.die.net/man/1/expect) is a traditional Unix utility to automate certain tasks, esp. interactive ones. Unfortunately, I have no experience with it, so maybe you could look up a few examples if you're considering this approach? – Edward Jul 07 '22 at 07:28