Compress file in SSH
tar -zcvf <new_tar_filename>.tar.gz <filename/directory>
DZone Snippets > nothingless > ssh
12551 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Sasha http://nothing-less.net
tar -zcvf <new_tar_filename>.tar.gz <filename/directory>
wget -rc --level=20 ftp://username:password@olddomain.net/public_html
mysqldump -h oldhost -u oldusername -poldpassword olddbname | mysql -h newhost -u newusername -pnewpassword newdbname
for files in /usr/local/apache/domlogs/*; do grep "wget" $files; done;
cd /usr/local/apache/domlogs grep wget * grep lynx * grep curl *
grep wget a* grep wget b* grep wget c* grep wget d* grep wget e* grep wget f* grep wget g* grep wget h* grep wget i* grep wget j* grep wget k* grep wget l* grep wget m* grep wget n* grep wget o* grep wget p* grep wget q* grep wget r* grep wget s* grep wget t* grep wget v* grep wget w* grep wget x* grep wget y* grep wget z*
for i in `ls /usr/local/apache/domlogs|grep -v 'bytes_log'`; do echo "checking on $i" && grep wget /usr/local/apache/domlogs/$i && grep lynx /usr/local/apache/domlogs/$i && grep curl /usr/local/apache/domlogs/$i; done > /root/grep-domlogs-results.txt
grep "dictionary attack" /var/log/exim_mainlog
top -d2 netstat -nap | grep SYN | wc -l netstat -nap | less
iptables -A INPUT -s ip.address -j DROP
cd /dev/shm ls
locate bindz locate botnet.txt locate dc locate ex0.pl locate kaiten locate r0nin locate udp.pl locate ... lsof | grep ., locate mybot
iptables -A INPUT -s ip.address -j DROP
tail -200 /var/log/exim_mainlog tail -200 /usr/local/apache/logs/error_log
tail -f /var/log/messages
sudo sysctl -w kern.maxfiles=22000 sudo sysctl -w kern.maxfilesperproc=20000
/scripts/upcp /scripts/upcp --force