grep -E '192\.168\.12\.35' /var/log/squid/logs/access.log | awk '{print $7;}' | sort | sed 's/http:\/\///' | cut -d ':' -f 1 | cut -d '/' -f 1 | uniq
- grep -> get only entries related to 192.168.12.35
- awk -> take 7th column, the URL
- sort -> sort them
- sed-> remove http:// from URL
- cut -> remove port number
- cut -> remove directory and file information
- uniq -> remove duplicate entries
1 comment:
ya its gud....
but its like love... u dont know wat will come out of that expression till u see the o/p on the screen
Post a Comment