emcrisostomo / fswatch

A cross-platform file change monitor with multiple backends: Apple OS X File System Events, *BSD kqueue, Solaris/Illumos File Events Notification, Linux inotify, Microsoft Windows and a stat()-based backend.
https://emcrisostomo.github.io/fswatch/
GNU General Public License v3.0
4.96k stars 327 forks source link

Ask for help #295

Open hiangeel opened 1 year ago

hiangeel commented 1 year ago

I have an app folder on iCloud. Because it is non-shareable, I want to copy its contents to a shared folder on Dropbox. I want every time I change a file on iCloud, it will be updated to Dropbox. I'm not professional, please help me with a detailed command/instruction. Thank you so much.

finnito commented 1 year ago

I would recommend something like this:

fswatch  /path/to/your/icloud/directory | xargs -I {} sh -c "cp '{}' /path/to/other/folder"

Reference: https://stackoverflow.com/a/35196708/3405502