I have a backup copy of my site located in /tmp/backup and want to copy it to /home/mysite/public_html But my aim is to copy only the .php files (with nested folders) and replace.
If I don't have nested folders i simply do cp /tmp/backup/*.php /home/mysite/public_html
But how i can do it for the whole site with many folders?