I have a directory with ~100 Gb. I need to copy this directory to other place skipping specific folders (there is a lot of them). The following is a wrong code to demonstrate my needs.
$ cp -r ~/directory_to_copy /path/to/copy --skip=foo --skip=bar
There is an example of result this command. Original directory tree is
~/directory_to_copy aaa foo doo bar bbb ccc ddd bar eee
Copied tree is
/path/to/copy/ aaa doo bbb ccc ddd eee
How to write command for my purposes?