Simple implementation of IP access log

Source: Internet
Author: User

Cat Bbs.access.2014-05-01.log | awk ' {print '} ' | Sort-n | uniq-c | Sort-n | TAC | Head-n 10

Cat Bbs.access.2014-05-01.log | awk ' {print '} ' | Sort-n | uniq-c | Sort-n | Tail-n 10

Cat Bbs.access.2014-05-01.log | awk ' {print $9} ' | Sort-n | Uniq-c


[[email protected] ~]# awk ' {print $} ' access_2010-12-8.log| Sort-n | Uniq-c |SORT-NR-K1

9 59.33.26.105

8 124.115.4.18

3 123.122.65.226

[[email protected] ~]# awk ' {print $} ' access_2010-12-8.log| Sort-n | Uniq-c |sort-n|tac

9 59.33.26.105

8 124.115.4.18

3 123.122.65.226

NAME

Tac-concatenate and print files in reverse #在反向连接和打印文件

-R,--regex

Interpret the separator as a regular expression #解释分离器作为一个正则表达式


This article is from "Try to be brave" blog, declined reprint!

Simple implementation of IP access log

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.