Re: Sort logfiles on common lines?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Sun, Sep 25, 2011 at 22:43, John R Pierce <pierce@xxxxxxxxxxxx> wrote:
> uniq can count occurances.  will require two sorts.  one to get all
> similar errors adjacent, the other to sort by count order.   instead of
> using field selects, lets just clip the timestamps off up front...
>
>   cut -c 17- | sort | uniq -c | sort -rn
>
> (17- means from char 17 on... I may have miscounted)
>

Thank you John! That is perfect! I'm going through the uniq manpage
now. Have a great night!

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux