O
O
Oleg Voitenko2017-01-19 12:12:30
CentOS
Oleg Voitenko, 2017-01-19 12:12:30

What are the words in the IP list?

I enter the command netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | Sort -NR (Calculate connections)
and see conclusion:
2 193.201.225.163
1 Servers)
1 Address

1 94.229.20.66
1 94.229.18.210
1 93.157.248.2
1 92.50.133.42 1 92.242.34.28
1 92.242.34.28
1 92.245.34.89
1 91.245.34.89
1 91.245.34.89 .34.149
1 91.210.200.9
1 91.108.60.20
What are these
1 servers)
1 Address
?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Kuts, 2017-01-19
@OliverV

Remove the title on output. For example like this

netstat -ntu | tail -n +3 | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr

M
Maxim, 2017-01-19
@pudovMaxim

output of netstat -ntu , there is always a header:

Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State

If I'm not mistaken, then awk '{print $5}' cuts out column 5, i.e. from the first line servers) , and from the second line Address

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question