1) Backup download
–>> rsync -av –progress –rsh=”ssh -l 3ixteam” star/ 66.7.205.226:star/
2) To block 25 port by IP
–>>
root@server [~]# cat test
netstat -n -p|grep 25|awk ‘{print $5}’|awk -F: ‘{print $1}’|sort|uniq|awk ‘{print “csf -d ” $1″/24″}’
root@server [~]#
3) To check pl file on the server(usernname)
–>>
tail -f /var/log/messages | grep ftp | grep *.pl
4) TO CHECK THE DISK SPACE
find -name ‘.pureftpd-upload*’ | xargs rm –f >> Delete file from user’s home folder
find -name ‘.pureftpd-upload*’ |awk ‘{print “rm -rf ” $9}’ >> Print Output from user’s home folder
find /home -type f -name ‘.pureftpd-upload*’ >> Checkes halfway uploaded files on server
find /home -type f -name ‘.pureftpd-upload*’ | xargs rm -f >> finds halfway uploaded files to server and deletes the files.
find /home -type f -name ‘.pureftpd-upload*’ |awk ‘{print “rm -rf ” $9}’ >> Prints output
ll |grep nobody |awk ‘{print “rm -rf ” $9}’ >> to delete nobody files from /tmp
find /tmp -type f -name ‘sess_*’ | xargs rm –f >> to delete session files.
ps -auxf |grep $1|awk ‘{print “kill -9 ” $2}’ >> Killwhom
Exim Spam : egrep “X-PHP-Script” * -R