dig check

To check dig for multiple domains [root@localhost ~]# vim digcheck  google.com yahoo.com gmail.com linuxmadeeasy.in puppethub.in youtube.com [root@localhost ~]# dig -f digcheck +noall +answer google.com. 258 IN A 216.58.199.142 yahoo.com. 1459 IN A 98.139.183.24 yahoo.com. 1459 IN A 206.190.36.45 yahoo.com. 1459 IN A 98.138.253.109 gmail.com. 300 IN A 216.58.199.165 linuxmadeeasy.in. 600 IN A 50.63.202.2 puppethub.in. 600 … Continue reading dig check

whois check

-------------------------------To check Expiration date-------------------------- [root@localhost ~]# vim script  #!/bin/bash for domain in `cat /root/domains.txt` do echo $domain >> whois-results.txt whois $domain | egrep -i "expiration date" >> whois-results.txt echo  >> whois-results.txt done [root@localhost ~]# vim /root/domains.txt  linuxmadeeasy.in google.com yahoo.com puppethub.in [root@localhost ~]# sh script  [root@localhost ~]# cat whois-results.txt  linuxmadeeasy.in Expiration Date:13-Apr-2017 10:02:00 UTC google.com   … Continue reading whois check

ping check for multiple hosts

Put the list of ip's in file mohammedrafi@NOC-RAFI:~$ vim ips 10.12.13.14 172.15.48.3 192.168.45.54 48.114.78.227 192.168.0.1 192.168.0.2 192.168.0.5 Write the script and place the path of ip's file mohammedrafi@NOC-RAFI:~$ vim script.sh #!/bin/bash # Program name: pingall.sh date cat /home/mohammedrafi/ips | while read output do ping -c 1 "$output" > /dev/null if [ $? -eq 0 ]; … Continue reading ping check for multiple hosts