find . \
-name 'user_prefs' \
-exec echo "whitelist_from [email protected]" >> {} \;'
I would like to add the line whitelist_from [email protected]
to all files that are found by find
, but my command does not work.
It just creates the file '{}'.
Shoud i use the for
command?
thanks!
You have to escape the '>>', for example like this:
find . -name 'user_prefs' -exec sh -c 'echo "whitelist_from [email protected]" >> {}' \;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With