one-liner (2)

List top 10 visitors by IP

The quick and dirty way:
cat $LOGFILE | awk '{ print $1 }' | uniq -c | sort -nr | head -n10

Similar Posts:

Install/Update Webmin

I’ve always liked one-liners. Here’s one (almost) for installing the latest webmin on almost any linux out there!

PMAN="rpm -U"
if [ -e /etc/debian_version ]; then
EXT=".deb"; PMAN="dpkg -i"
wget -O - | grep $EXT | grep -o 'http://[^"]*' | xargs wget -O webmin_latest$EXT; $PMAN webmin_latest$EXT


You could copy and past the above in a terminal session, or the following:
wget; sh

Similar Posts: