nslookup以非交互模式查找SRVlogging(或任何非Alogging)

无论如何,运行nslookup(Centos 5或Windows),以便它将查找除A以外的loggingtypes,而无需进入交互模式并使用set type= ? 例如,我想要一个像下面这样的命令:

 nslookup --type=SRV _ldap._tcp.mydomain.com 

你其实已经差不多了。 在这两个窗口(至less我在这里的Win7框)和Ubuntu,你会做nslookup -type=SRV _ldap._tcp.mydomain.com (注意单个短划线)

这为我工作

 nslookup -q=SRV _ldap._tcp.mydomain.com 

所以nslookup -q = SRV _sip._tls.tan-ha.com

 Server: myhost.local Address: 1.2.3.4 (my ip) Non-authoritative answer: _sip._tls.tan-ha.com SRV service location: priority = 100 weight = 1 port = 443 svr hostname = sipdir.myotherdomainorso.com sipdir.myotherdomainorso.com internet address = 110.12.23.34 sipdir.myotherdomainorso.com AAAA IPv6 address = 1111:111:ffff:3004::35 

看来nslookup手册页是不正确的了。

nslookup没有强大的非交互模式:

       “非交互模式是用来打印名称和
       主机或域请求的信息“

相反,使用主机(1):

主机-t SRV example.com