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

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.


  • How to disable Google Fonts in Wordpress
  • Unable to load dynamic library /usr/lib64/php/modules/php_openssl
  • mysqld in Linux hacked
  • W: GPG error: http://archive.debian.org squeeze Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA NO_PUBKEY 64481591B98321F9
  • cannot mount kvm ntfs image
  • h264 DVR security camera footage cannot be played
  • dhcpd.conf how to secure so only known and allowed clients will be given dhcpd IP address leases
  • Thunderbird E-mail List Blank White but e-mails still clickable and viewable
  • css responsive images
  • responsive table without changing much code solution
  • yum how to install old obsolete packages
  • PHP Howto Store Value of Included File Output Into Variable
  • PHP Migration from 5.3 to 5.4+ and dealing with deprecated functions
  • ffmpeg vidstab to stabilize video
  • userdel user userdel: cannot lock /etc/passwd; try again later.
  • mdadm how to mount inactive array
  • How to find and mount mdadm arrays automatically
  • M2Crypto.SSL.Checker.WrongHost: Peer certificate subjectAltName does not match host, expected fedora-archive.ip-connect.vn.ua, got DNS:mirror.ip-connect.vn.ua
  • [Wed Sep 20 15:34:44 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Sep 20 15:34:44 2017] [error] Init: Unable to read server certificate from file /www/ssl-certs/server.crt [Wed Sep 20 15:34:44 2017] [error] SSL Library Err
  • linux how to answer yes to copy