How can I set up a script which copies all modified files and subfolders from folder A to folder B using inotifywait?
I have a folder (A) with lots of files and subfolders.
I want to automatically copy only recently created or modified files and subfolders to folder (B). Older files should not be copied.
I want to use inotifywait for monitoring folder (A). For copying perhaps rsync or a similar tool.
How would the script look like?