统计高频IP
时间:2007-01-05 来源:lolojee
统计高频IP,然后封^_^
netstat -an | grep -w 80 | grep EST | awk '{print $2}' | cut -d. -f1-4 | sort | uniq -c | sort
cut - cut out selected fields of each line of a file
SYNOPSIS
cut -b list [-n] [file...] bytes
cut -c list [file...] characters/coloum positions
cut -f list [-d char] [-s] [file...] character-delimited fields use -d to define the field delimiter, default is 'TAB' the 'list' can be used as follows 1. 1,2,3,4 list of positions 2. 1-4 ranges 3. 2- from 2 to the last field 4. -5 from 1 to 5 (-b,-c,-f) uniq - report or filter out repeated lines in a file SYNOPSIS
uniq [-c|-d|-u] [-f fields] [-s chars] [input [output]]
uniq [-c|-d|-u] [-n] [+m] [input [output]] uniq reads the input file, comparing adjacent lines. In the normal case, the second and succeeding copies of repeated lines are removed; the remainder is written on the output file. ---that is why there is a 'sort' before the uniq -c
cut -b list [-n] [file...] bytes
cut -c list [file...] characters/coloum positions
cut -f list [-d char] [-s] [file...] character-delimited fields use -d to define the field delimiter, default is 'TAB' the 'list' can be used as follows 1. 1,2,3,4 list of positions 2. 1-4 ranges 3. 2- from 2 to the last field 4. -5 from 1 to 5 (-b,-c,-f) uniq - report or filter out repeated lines in a file SYNOPSIS
uniq [-c|-d|-u] [-f fields] [-s chars] [input [output]]
uniq [-c|-d|-u] [-n] [+m] [input [output]] uniq reads the input file, comparing adjacent lines. In the normal case, the second and succeeding copies of repeated lines are removed; the remainder is written on the output file. ---that is why there is a 'sort' before the uniq -c
相关阅读 更多 +