MySQL Find And Replace
by Kyle on
UPDATE `tbl_name` SET tbl_field = replace(tbl_field, 'FIND', 'REPLACE');
Remove Iframe Injected Code
by Kyle on
If your index.html and index.php files have suffered from an iframe injection, you can use the following grep/sed command for clearing it out.
Please be careful and test first with just the grep command to ensure you don't clear out anything you don't need.
This command does not backup files!
grep -lr -e '<iframe src="http://.*</iframe>' * | xargs sed -i 's/<iframe src="http:\/\/.*<\/iframe>//g'
Replace Spaces In File Names With Underscores
by Kyle on
find . -type f -iname "*.mp3" -exec rename "s/ /_/g" {} \;