There are times when you doubt that something strange is happening with your site. You might be suspecting some kind of attack. Apache logs can help you to quickly summarize number of requests coming from various IP addresses.
Following command will display 20 IP addresses that were accessing your website most frequently, sorted so that most frequent are on top.
cat path-to-log-file.log | awk '{print $1}' | sort -n | uniq -c | sort -nr | head -20
Notes:
There is a way using CSS! If you set your width depending on the parent…
grep -rnw '/path/to/somewhere/' -e 'pattern' -r or -R is recursive, -n is line number, and -w stands for match the…
This snippet will remove duplicate lines from text file: awk '!seen[$0]++' filename It will display…
Easiest way to export your database is through phpMyAdmin. With few clicks you can get…
Put this code into a .sh file, add executable permissions to it and add it…
Put this code into a .sh file, add executable permissions to it and add it…