find . -name '.htaccess' -print | xargs grep -il 'sound' | xargs -p sh -c ">{}"
Trying to find some .htaccess files on a host that've been compromised, grep them to make sure they are bad .htaccess (not all on server have been ruined) and blank them out.
All is working, except the last part. Tried many variations of echo >
etc.
I'm missing a fundamental here and can't seem to grok it out of all the man pages.
Thanks.
Per usual, I get it minutes after posting a question.
Think it helps sometimes to just spell it out (literally)...
Try it with the
: > filename
noop.But would it not make more sense to remove the bad .htaccess files rather than zero them?