Posts Tagged ‘find’
Finding spam sending PHP scripts on your server
#php.ini
mail.add_x_header = On
mail.log = /var/log/phpmail.log
#find / -name php.ini | xargs perl -pi -e ‘s/\;mail\.log =/mail\.log = \/var\/log\/phpmail.log/i’
Find
Шукаємо старі директорії і архівуємо.
find ./ -name . -prune -o -type d -mtime +90 -exec tar czvpf {}.tgz ./{} \; -exec rm -rf {} \;
mass find and replace
find / -name php.ini | xargs sed -i 's/expose_php = On/expose_php = Off/g'
find / -name php.ini | xargs perl -pi -e 's/expose_php = On/expose_php = Off/i'