networking - Is there a locate type command for finding hostnames? - Ask Ubuntu


i work on large network thousands of instruments, , sometimes, wish use command $locate --hostname dawar locate information ip, , full hostname of computer(s) named "dawar" on network. wrote little program uses depreciated c function gethostsbyname , gethostsbyaddress, , guess write in search function. i'm curious if there similar program can search nameserver,... not have write.

alternatively, non-depreciated function equivalent gethostbyname in c?

here output of nslookup, don't want use, given how output appears;

nslookup 123.111.129.108 server:     127.0.1.1 address:    127.0.1.1#53  108.129.111.123.in-addr.arpa    name = rm135.domain. 

take @ "dig" utility

> # dig google.com  ; <<>> dig 9.8.2rc1-redhat-9.8.2-0.10.rc1.el6 <<>> google.com ;; global options: +cmd ;; got answer: ;; ->>header<<- opcode: query, status: noerror, id: 8753 ;; flags: qr rd ra; query: 1, answer: 6, authority: 0, additional: 0  ;; question section: ;google.com.                    in       ;; answer section: google.com.             120     in            209.85.202.100 google.com.             120     in            209.85.202.139 google.com.             120     in            209.85.202.102 google.com.             120     in            209.85.202.101 google.com.             120     in            209.85.202.113 google.com.             120     in            209.85.202.138  ;; query time: 1 msec ;; server: 192.168.0.228#53(192.168.0.228) ;; when: thu oct 27 14:43:06 2016 ;; msg size  rcvd: 124 

Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User