Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I work at a university with well over 100,000 machines. Is there any way, via querying DNS, that I can find a list of hostnames containing a string?
We've got about two dozen machines start are part of group XYZ. the hostnames are all XYZ-(buildingName)-(some-random-string). Someone asked me for the IP of a certain one...... Where to go from here?
I'll admit, I don't have much experience working in a domain so large that I forget hostnames, so I'm sorta lost.
not really, not if that name structure is as you listed it. if you do know all the potential parts can you not piece it together? i'm unclear here which part of the hostname is the bit you would change. i guess you could look to do a zone transfer - "dig -t AXFR domain.com" and just grepping the output for the bits of string that you know.
I don't think grepping a zone transfer of 100,000+ entries would go too well.
the names are a whole bunch like:
XYZ-bldg1234-room13
XYZ-4567-frontlobby
XYZ-lobby-bldg35
XYZ-rm300-2846
XYZ-rm300-bldg234
bldg234-XYZ-rm100
rm100-bldg780-XYZ
I guess grepping a zone transfer is the only way to go. Essentially what I need is full-text searching on names.
not great. of course if you are running these name servers yourself then you can interrogate the DNS locally. there are many BIND based IPAM solutions with gui's which may well provide this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.