commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
This command does a tally of concurrent active connections from single IPs and prints out those IPs that have the most active concurrent connections. VERY useful in determining the source of a DoS or DDoS attack.
This will tell you who has the most Apache connections by IP (replace IPHERE with the actual IP you wish to check). Or if you wish, remove | grep -c IPHERE for the full list.
List top 20 IP from which TCP connection is in SYN_RECV state.
Useful on web servers to detect a syn flood attack.
Replace SYN_ with ESTA to find established connections
usefull in case of abuser/DoS attacks.
Greps IRC logs for phrases and lists users who said them.
This grabs all lines that make an instantation or static call, then filters out the cruft and displays a summary of each class called and the frequency.
This uses awk to grab the IP address from each request and then sorts and summarises the top 10.
Searches all .php files for a static instantiation of a class and displays the class names along with their frequencies.