Retrieve IP Address from URL – nslookup

In unix/linux we have a utility called nslookup. Which is very useful to query internet naming servers.

 Man Page for nslookup

1) Lets see how to retrieve the ip address from the URL ( eg. http://www.google.com )

 nslookup www.google.com

Non-authoritative answer:
Name:    www.google.com
Address: 173.194.32.81
Name:    www.google.com
Address: 173.194.32.84
Name:    www.google.com
Address: 173.194.32.82
Name:    www.google.com
Address: 173.194.32.83
Name:    www.google.com
Address: 173.194.32.80
Publicités

Find most commonly used commands in your system

The below one liner is used to show the most commonly commands and its count.

$  history | awk '{a[$2]++;next}END{for (i in a){print i " --> " a[i]}}' | sort -nr -k3

clear --> 25
cal --> 23
history --> 9

date --> 6
ls --> 2
cd --> 2
pwd --> 1
ps --> 1
man --> 1
env --> 1
echo --> 1
chmod --> 1
cat --> 1
awk --> 1
nmap --> 19
netstat --> 19
chmod --> 12
ssh --> 11
ping --> 10
ifconfig --> 10
redshift --> 9
shh --> 8
nikto --> 8
iptables --> 7