Dump top 10 ports tcp/udp from nmap

nmap -oA derp --top-ports 10 localhost>/dev/null;grep 'services\=' derp.xml | sed -r 's/.*services\=\"(.*)(\"\/>)/\1/g'
To be used with other port scanners and or for help with iptables --dport 1000:2000 style expansion
Sample Output

By: operat0r
2020-02-06 12:59:24

What Others Think

That is one of the main reasons that I am very much interested in knowing the history of the things. As most of the time their names are greatly related with their history. Also sometimes you can realize the importance of the help of expert thing just by knowing its name like this one here shows its importance by its name that is “cure all”.
shawnkemp · 54 weeks and 5 days ago
To be used with other port scanners and or for help with iptables.
paulfreiberg · 37 weeks and 4 days ago
paulfreiberg · 37 weeks and 4 days ago
learned alot here but are there any other alternatives? lifecoachindianapolisin.com
looneyhans · 13 weeks and 6 days ago
Totally efficient and so friendly. I'd highly recommend them to mold remediation
idasanka · 9 weeks and 1 day ago
kitchen remodeling el paso I really enjoyed reading your article. I found this as an informative and interesting post, so I think it is very useful and knowledgeable.
yeoyeo · 7 weeks and 4 days ago
This is exactly what I was looking for. Thank God I found this site! Thanks for sharing this stairs
sammm · 4 weeks and 3 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: