Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-12-2006, 07:31 AM   #1
Registered: Aug 2005
Distribution: Arch Linux
Posts: 291

Rep: Reputation: 47
search / count unique patterns in text file

I have an http log file. Using "cut" command i managed to get the IPs hitting my web server. But the problem is i need unique IPs hitting the server with the count as of how many times they have hit. How can i do this?

Thanks in advance...

edit: I know a script may serve this. Does a command sequence exist for this?

Last edited by logicalfuzz; 10-12-2006 at 07:32 AM.
Old 10-12-2006, 10:56 AM   #2
Senior Member
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,544
Blog Entries: 4

Rep: Reputation: 57
uniq -uc
man uniq
Old 10-14-2006, 07:58 AM   #3
Registered: Aug 2005
Distribution: Arch Linux
Posts: 291

Original Poster
Rep: Reputation: 47
Holy me!!!
How can i forget uniq!! Thanks for the help cs-cam...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Count occurances of a string in a text file MicahCarrick Linux - Software 1 06-24-2006 04:25 PM
Deleting text between two different patterns activeco Linux - General 7 09-13-2005 06:05 PM
Which command to search text/phrase in file? b:z Linux - General 2 03-30-2005 09:11 PM
Need to search for *last* occurrance in a text file ericcarlson Linux - Software 1 09-11-2004 02:08 PM
How do you search for a file in text mode? cyberkid12 Linux - General 7 12-21-2002 12:42 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:04 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration