I have two identical folders with subfolders for development and live like:
/development/subdirectory1
/development/subdirectory1/subsub1
/development/subdirectory2
/development/subdirectory2/subsub2
/development/subdirectory2/subsub2/subsubsub2
/live/subdirectory1
/live/subdirectory1/subsub1
/live/subdirectory2
/live/subdirectory2/subsub2
/live/subdirectory2/subsub2/subsubsub2
And I want to rsync all recent work done after a specific from development folder to live folder.
To do this, I am using
find development/ -type f -newermt '2/2/2020 0:00:00' -exec rsync -avz {} live/ \;
But what's happening is that all files from development are being copied to live folder's root even the files are in subfolders of development folder. But what I want is rsync to sync files in their exact subfolders on destination.
So, basically what I want is to perform 'rsync -avz' to update files after a specific date.
I have tried multiple solutions also to find solution, but could not. Tried with --files-from. Any thought on this?