0

I am trying to run Unison to sync my files locally. I want that to occur periodically, without the need of any interaction. For that reason I run gnome-schedule with the following command:

unison Folder -silent -ui text

Everything works fine, just the terminal stays open and prompts for ENTER. I want to exit the terminal automatically after finishing the syncronization. How could I do this?

Thanks and greetings

Registered User
  • 9,631
  • 14
  • 53
  • 85
kleinempfaenger
  • 993
  • 6
  • 13

1 Answers1

2

You need to use the exit builtin function so that terminal may close automatically.Just add exit at the end of the command as

unison Folder -silent -ui text;exit

This will exit the terminal after command executes.

Registered User
  • 9,631
  • 14
  • 53
  • 85
  • Thanks, worked great. I had tried this command before, but missed the ";". Is there a command to avoid that the terminal window pops up, when the command is executed? – kleinempfaenger Apr 23 '14 at 04:32
  • You need to set up a cron job.read http://askubuntu.com/q/2368/184942. actually you are doing the same but with a GUI frontend.I think CLI method does not pop up a terminal. – Registered User Apr 23 '14 at 04:35