Find resolvable hosts in subnet

nmap -sL 74.125.237.1/24
Nmap will list all IP's in the target specified, can specify subnet or range of IP addresses. It will attempt to resolve all IP's listed. No packets sent to target only generates DNS queries.
Sample Output
Starting Nmap 5.61TEST5 ( http://nmap.org ) at 2012-05-30 10:47 EST
Nmap scan report for syd01s04-in-f0.1e100.net (74.125.237.0)
Nmap scan report for syd01s04-in-f1.1e100.net (74.125.237.1)
Nmap scan report for syd01s04-in-f2.1e100.net (74.125.237.2)
Nmap scan report for syd01s04-in-f3.1e100.net (74.125.237.3)
Nmap scan report for syd01s04-in-f4.1e100.net (74.125.237.4)

0
2012-05-30 00:51:20

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: