Parsing Verisign .COM/.NET zone files
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:
The output will be something like this: Timing test (DB as of April 09, 2006, tested on Dual Opteron 244, 4G RAM)grep '^[a-zA-Z0-9-]\+ NS .*' edu.zone|sed 's/NS .*//'|uniq
DOT EDU (edu.zone, 7,645 domains) real 0m0.143s user 0m0.240s sys 0m0.010s DOT NET (net.zone, 7,338,096 domains) real 3m33.223s user 4m29.380s sys 0m3.130s DOT COM (com.zone, 50,495,462 domains) real 24m47.369s user 32m51.330s sys 0m25.420sIf divide the one-liner command into 3 separate ones, performance decreases
# time grep '^[a-zA-Z0-9]\+ NS .*' net.zone > 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
0 Comments:
Post a Comment
Home