Linux how to whois query other gTLDs such as .club solution

whois in Linux is incredibly out of date and does not seem to recognize most new TLDs domains, but there is a quick and easy tip/hack/tweak for this.

An example of new TLD's site as .review .site .club

whois somesite.club

No whois server is known for this kind of object.
 

bash to the rescue

Now I did try to apply this in .bashrc but DO NOT!  I think the * wildcard or something else in the code causes a recursive infinite loop that will slow or cash your computer. (I am not kidding I had a load of 1000!).

1.) The bash script (finds the whois server for the .tld and queries it):

#!/bin/bash
server=$1
whois -h `whois "$1" -h whois.iana.org| grep whois\:| sed -e s/whois\:\\s*//` "$1"

2.) Save it to a file in your home ~/whoisserver.sh

3.) Edit ~/.bashrc

Add the following:

function whois() { /home/yourdir/whoisserver.sh $1; }

To apply instantly in your current shell/bash:

source .bashrc

The reason I used a function is because it supports variables whereas a bash "alias" does not.

Latest Articles

  • prosody xmpp server "Failed in all attempts to connect to proxy.eu.jabber.org"
  • VMWare ESXi 6.7 SSH/PowerShell CLI Commands
  • VMWare Vsphere VCSA Graphical Install Creates json
  • error while loading shared libraries: libasound.so.2: cannot open shared object file: No such file or directory
  • ./xmr-stak: error while loading shared libraries: libmicrohttpd.so.10: cannot open shared object file: No such file or directory
  • qemu-img resize howto
  • gmail.com address failing in Postfix
  • VMWare Hardware virtualization is selected and cannot be deselected due to selection of VBS Insufficient resources to satisfy configured failover level for vSphere HA.
  • Debian Mint Ubuntu compiling xmr-stak
  • ./nsgpucnminer: error while loading shared libraries: libOpenCL.so.1w: cannot open shared object file: No such file or directory
  • *** These critical programs are missing or too old: gawk
  • migration/4 migration 4 is using too much CPU
  • convert.im6: Unknown field with tag 317 (0x13d) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/788.
  • Python SyntaxError: Missing parentheses in call to 'print'
  • Linux How To Rename Files
  • OpenVZ container will not stop Child 546246 exited with status 1
  • [warn] VirtualHost 10.2.5.101:443 overlaps with VirtualHost 10.2.5.101:443, the first has precedence, perhaps you need a NameVirtualHost directive
  • Ethereum Client Errors
  • PayPal IPN Failed "result: IPN Handshake Invalid"
  • Linux Centos 7 HowTo Install Yarn