From the journal

String Operations – Linux Command.

To find a string and delete the whole line: find /var/www/vhosts/websitename/httpdocs/ -type f -exec sed -i ‘/.\ pRn9c9o49ufczP0PKuPGuHHAGA.\ /d’ {} \\; To find a string and replace it with all the…

Explore this page ↓
String Operations – Linux Command
String Operations – Linux Command
Share

To find a string and delete the whole line:

find /var/www/vhosts/websitename/httpdocs/ -type f -exec sed -i '/.*pRn9c9o49ufczP0PKuPGuHHAGA.*/d' {} \;

To find a string and replace it with all the files:

find /var/www/vhosts/websitename/httpdocs/ -type f -exec sed -i 's/<?echo/<?php echo/g' {} \;

To find a string in server (all websites)

find /www/*/httpdocs/ -type f -name "*authorize*.*"

find /www/*/httpdocs/ -name '*.php' -exec grep -l "authorize" {} \;

Keep reading