Bash:
+ tree src
src
├── invoice.pdf
├── private-resources
│ ├── attachment1.pdf
│ ├── attachment2.pdf
│ └── attachment3.pdf
└── receipt.pdf
+ rsync -nai --include private-resources/attachment2.pdf --exclude 'private-resources/*' \
src/ \
dest
>f+++++++++ invoice.pdf
>f+++++++++ receipt.pdf
cd+++++++++ private-resources/
>f+++++++++ private-resources/attachment2.pdf
mmmhhh...
But I wanted it private-resources/attachment2.pdf to be copied to the root directory, that is, the output I expected is the following
Bash:
>f+++++++++ invoice.pdf
>f+++++++++ receipt.pdf
>f+++++++++ attachment2.pdf
Yes you can?