1. Linux Mount Winodws shared folder
Mount-t cifs-o username=name,password=123//172.16.3.56/d/guaizai
2. View the number of concurrent requests for HTTP and their TCP connection status:
Netstat-an | awk '/^tcp/{s[$NF]++}end{for (a in s) print A,s[a]} '
3, with tcpdump sniffing 80 port access to see who the highest
Tcpdump-i ETH0-TNN DST Port 80-c 100 | Awk-f "." ' {print $ '. $ "." $ "." $4} ' | Sort | uniq-c |
4, view the current system per IP connection number
Netstat-an | Awk-f "[:]+" ' {s[$6]++}end{for (a in s) print S[a],a} ' | Sort-nr | Head
5.32-bit random password generation under shell
Head/dev/urandom | md5sum | Head-c 30
6, statistics of Apache Access.log in the most visited 5 IP
awk ' {s[$1]++}end{for (a in s) print A,s[a]} ' Access.log | Sort-nr
7. Find out the txt end of the TMP directory! and will be renamed to *.sh
#!/bin/bash
Str= ' find/tmp/-name \*.txt '
For I in $str
Do
MV $i ${i%txt}sh
Done
8. View SSH Malicious links
Cat/var/log/secure | grep "Failed Password" | Egrep-o "([0-9]{1,3}\.) {3} [0-9] "| Sort-nr | Uniq-c
9. View IP that failed with root login
Cat/var/log/secure |grep "Failed password for root" | Egrep-o "([0-9]{1,3}\.) {3} [0-9] "| Sort-nr | Uniq-
10. View process path through PID
Ll/proc/pid
This article is from the "Paper Gun Group" blog, please be sure to keep this source http://qiaivheise.blog.51cto.com/7743217/1953346
Linux Common commands ... Continuous update