Parsing Verisign .COM/.NET zone files
April 9th, 2006 by admin

If you have access to the zone files from Verisign (COM/NET/EDU) and want to extract the list of domains from these zone file. This is a one-line extraction command in Linux:

The command:

grep '^[a-zA-Z0-9-]\+ NS .*'|sed 's/NS .*//'|uniq

The output will be something like this:

Timing test (DB as of April 09, 2006, tested on Dual Opteron 244, 4G RAM)

DOT EDU (, 7,645 domains)
real    0m0.143s
user    0m0.240s
sys     0m0.010s

DOT NET (, 7,338,096 domains)
real    3m33.223s
user    4m29.380s
sys     0m3.130s

DOT COM (, 50,495,462 domains)
real    24m47.369s
user    32m51.330s
sys     0m25.420s

If divide the one-liner command into 3 separate ones, performance decreases

# time grep '^[a-zA-Z0-9]\+ NS .*' > net.grep
real    2m27.388s
user    2m21.480s
sys     0m2.400s

# time sed 's/NS .*//' net.grep > net.sed
real    1m46.816s
user    1m0.270s
sys     0m1.380s

# time uniq net.sed > net.uniq
real    1m13.276s
user    1m4.180s
sys     0m0.570s

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

»  Substance:WordPress   »  Style:Ahren Ahimsa