![파일을 변경할 때마다 수동으로 파일 동기화(항상 집 Wi-Fi에 연결되어 있는 데스크탑과 가지고 다니는 노트북 사이)](https://linux55.com/image/200190/%ED%8C%8C%EC%9D%BC%EC%9D%84%20%EB%B3%80%EA%B2%BD%ED%95%A0%20%EB%95%8C%EB%A7%88%EB%8B%A4%20%EC%88%98%EB%8F%99%EC%9C%BC%EB%A1%9C%20%ED%8C%8C%EC%9D%BC%20%EB%8F%99%EA%B8%B0%ED%99%94(%ED%95%AD%EC%83%81%20%EC%A7%91%20Wi-Fi%EC%97%90%20%EC%97%B0%EA%B2%B0%EB%90%98%EC%96%B4%20%EC%9E%88%EB%8A%94%20%EB%8D%B0%EC%8A%A4%ED%81%AC%ED%83%91%EA%B3%BC%20%EA%B0%80%EC%A7%80%EA%B3%A0%20%EB%8B%A4%EB%8B%88%EB%8A%94%20%EB%85%B8%ED%8A%B8%EB%B6%81%20%EC%82%AC%EC%9D%B4).png)
이 작업을 수행하려면 inotifywatch 등을 사용해야 한다는 것을 알고 있습니다. 또한 rsync를 사용할 수 있다는 것도 알고 있습니다. 보안을 강화하려면 SSH를 통해 연결해야 한다는 것을 알고 있지만, 모르는 것이 있습니다. 어디서부터 시작해야 할까요?
다음과 같은 논리를 구현하고 싶습니다.
내 노트북에
if (any of the file in the watched folder (locally on my laptop) changes && the laptop is connected to my home wifi && my desktop is accessible through SSH) {
run rsync and and some ssh command to access my desktop and update the folder on my desktop
}
내 데스크탑에
if (any of the file changes in the watched folder (locally on my desktop) and my laptop is accessible with SSH) {
run rsync and and some ssh command to access my laptop and update the folder on my laptop
}
저는 KDE Neon을 사용하여 두 대의 컴퓨터를 설치하고 (거의) 동일한 설정을 갖고 있습니다.