Possible Duplicate:
bash: find -exec and filenames
I'm using a find command to find a series of files all with the same name. I then want to append the contents of a text file to the bottom of each of those files that my find command located. I thought this would be straightforward enough but I can't seem to get it to work right. Here is my command:
find . -type f -name 'my_file.php' -exec cat new_include.txt >> {} \;
When I run this using sudo, I get a permission denied error:
-bash: {}: Permission denied
If I su into the server and run it as root, I don't get an error but none of the files actually update. Am I missing something here? (This is being done on a CentOS 6 server, if that makes a difference.)