Comenzi utile Linux

Cautam un IP in loguri pe mai multe domenii:

grep -r "82.145.209.89" /var/www/vhosts/

sau mai bine asa:

grep -r "176.31.18.235" /var/www/vhosts/*/statistics/logs/*
 

Ca sa monitorizam ce face apache-ul:

strace -f -o /home/<dir pentru log>/apache-trace.txt  /etc/init.d/httpd start

Stergem toate logurile la toate subdomeniile:

rm -f /var/www/vhosts/*/statistics/logs/*
 

Leave a Reply

Your email address will not be published. Required fields are marked *