I need to find all folders on a Linux server with directory name config
and put a .htaccess
in that directory containing "deny from all
".
I'm currently trying to run:
find /home/www/sites/ -type d -name "config" -exec sh -c 'echo "deny from all" > .htaccess' \;
But it doesn't work.
What have I missed?
Try