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.


  • bash Linux how to get first or last letters of a word
  • l2tp ipsec VPN Error Sep 12 18:16:25 vps pluto[7299]: ERROR: asynchronous network error report on eth0 (sport=500) for message to 192.5.6.2 port 20640, complainant 192.5.6.2: Connection refused [errno 111, origin ICMP type 3 code 3 (not authenticated
  • Centos 5.9 Working Vault Repo file
  • Disable SSH Password Authentication to Increase Security and Harden SSH Linux Unix Server Ubuntu Mint Centos Debian
  • ecryptfs how to mount or recover from a backup
  • Linux bash script to see what connected computers respond to ping
  • rsync specify alternate port non-standard port than 22
  • Centos 6.6/6.9 KVM VM Kernel Panic On Boot - Kernel panic - not syncing: Attempted to kill init!
  • Cannot allocate TUN/TAP dev dynamically - FreeBSD/OpenBSD OpenVPN Client error Solution
  • Linux Mint/Ubuntu/Debian apt how to downgrade a package
  • Ubuntu Linux Mint How To Exclude Stop Package from being Upgraded or Installed
  • Intel NUC Lower Power Green Computing Boxes Review/Comparison of J3160 and J3455 Models
  • How to backup entire computer Linux Mint Ubuntu with tar
  • tar how to ignore failed reads and not exit
  • kdenlive titles/text renders as white screen when using .sh script
  • [1035724.274610] [drm:intel_pipe_update_end [i915_bpo]] *ERROR* Atomic update failure on pipe A (start=62076478 end=62076479) time 102 us, min 894, max 899, scanline start 893, end 900 W: Possible missing firmware /lib/firmware/i915/kbl_dmc_ver1.bin
  • ffmpeg how to watermark and concatenate in one command
  • /usr/bin/ld: cannot find -lboost_system-mt-s /usr/bin/ld: cannot find -lboost_filesystem-mt-s /usr/bin/ld: cannot find -lboost_program_options-mt-s /usr/bin/ld: cannot find -lboost_thread-mt-s collect2: error: ld returned 1 exit status make: *** [cag
  • Wine uninstalled broken on Linux Mint
  • ffmpeg trouble concatenating similar but different files