"unison -repeat watch"를 실행하면 파일 시스템 감시자 오류가 발생합니다.

"unison -repeat watch"를 실행하면 파일 시스템 감시자 오류가 발생합니다.

호스트 OSX의 폴더를 Ubuntu를 실행하는 가상 머신으로 동기화하려고 합니다. (라라빌/홈스테드). 다음은 호스트 컴퓨터에서 실행하는 명령입니다.

$ unison ssh://[email protected]//home/vagrant/www ~/unison/www -repeat watch

다음 출력을 생성합니다

Contacting server...
Connected [...]
Looking for changes
  Waiting for changes from server
Fatal error: Server: Unexpected response 'Usage: unison-fsmonitor [options] root [path] [path]...' from the filesystem watcher (expected VERSION)

내 로컬 호스트에서:

$ unison -version
unison version 2.48.3
$ unison-fsmonitor
VERSION 1

내 가상 머신에서:

$ unison -version
unison version 2.48.3
$ unison-fsmonitor
Usage: unison-fsmonitor [options] root [path] [path]...
This program monitors file system changes on all given (relative to root) paths
and dumps paths (relative to root) files to a file. When launched, this file is
recreated. While running new events are added. This can be read by UNISON
to trigger a sync on these files. If root is a valid unison profile, we attempt
to read all the settings from there.

내 로컬 호스트의 경우 homebrew를 통해 unison을 설치하고 unox.py파일을 다운로드했습니다.github에서에 설치하세요 /usr/local/bin/unison-fsmonitor.

내 VM의 경우 ppa:eugenesan/ppa일관성을 사용하고 다운로드했습니다.버전 2.48.3 소스fsmonitor.py아래에 포함된 Consistency 웹사이트에서 사본을 가져오세요 /usr/bin/unison-fsmonitor.

작품이 없어도 조화에는 문제가 없습니다 -repeat watch.

가상 머신(역방향 SSH) 내에서 동일한 명령을 실행하려고 하면 동일한 출력이 표시됩니다. unison-fsmonitor는 설명된 프로토콜을 준수해야 한다고 읽었 /src/fswatch.ml지만 기본 스크립트는 그렇지 않은 것 같습니다 fsmonitor.py. 내가 뭐 놓친 거 없니? unison-fsmonitor 실행 파일 대신 사용할 수 있는 다른 스크립트가 있습니까?

답변1

소스 코드에서 Unison을 컴파일하면 unison-fsmonitor별도의 실행 파일이 생성됩니다. 실행하면 unison-fsmonitor인쇄된 VERSION 1다음 예상대로 기다립니다. 가상 머신에서 Unison을 컴파일하고 스크립트 대신 실행 파일을 사용하세요 fsmonitor.py.

당신은 할 수 있습니다Unison 2.48.3에 대한 변경 로그그들은 새로운 파일 감시 유틸리티를 만들었습니다. fsmonitor.py새로운 유틸리티를 사용해야 하는 경우 해당 유틸리티가 이번 릴리스에 포함된 이유가 명확하지 않습니다. 아니면 새로운 유틸리티와 Python 스크립트가 실제로 다른 작업을 수행할 수도 있습니다...?

관련 정보