Is the anyway to run nslookup (Centos 5 or Windows) such that it will look up record types other than A, without having to go to interactive mode and using set type=
? For example, I'd like a command like the following:
nslookup --type=SRV _ldap._tcp.mydomain.com
You actually almost had it. On both window (at least my Win7 box I have here) and Ubuntu you would do
nslookup -type=SRV _ldap._tcp.mydomain.com
(notice the single dash)This work for me
So nslookup -q=SRV _sip._tls.tan-ha.com
It appears the nslookup man page isn't correct anymore.
nslookup doesn't have a powerful non-interactive mode:Instead, use host(1):