How can I copy everything (files and directories(even if they are empty)) from one directory to another, except files ".php", and files with name "config.yml". I need to do this with single command. I have tried this one
find ./ -type f ! ( -name "*.php" -o -name "config.yml" ) -exec cp --parents -r -t /my/directory/ "{}" +
It works but if the directory have only files ".php", command will skip the directory and do not copy the empty one, but I need the directory even if it will be empty.