I'm trying to use rsync to copy a directory recursively, and copying symlinks referent. I also want to exclude certain directories that are located within the symlink. This is the part that's not working.
I'm using the following command:
rsync -aPL source/ dest/ --exclude source/dir/symlink/node_modules
. |-dir |---symlink |-----another_dir |-----node_modules
Unfortunately, it is still copying the node_modules directory, even though I'm trying to exclude it. Any idea how to do this, if possible?