Showing posts with label linux commands. Show all posts
Showing posts with label linux commands. Show all posts

Wednesday, December 17, 2014

nslookup, host, dig commands

nslookup www.google.com
Server:         10.40.4.247
Address:        10.40.4.247#53

Non-authoritative answer:
Name:   www.google.com
Address: 74.125.236.50
Name:   www.google.com
Address: 74.125.236.52
Name:   www.google.com
Address: 74.125.236.51
Name:   www.google.com
Address: 74.125.236.48
Name:   www.google.com
Address: 74.125.236.49




host www.google.com
www.google.com has address 74.125.236.50
www.google.com has address 74.125.236.49
www.google.com has address 74.125.236.52
www.google.com has address 74.125.236.48
www.google.com has address 74.125.236.51




dig www.google.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6 <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34580
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com.                        IN      A

;; ANSWER SECTION:
www.google.com.         286     IN      A       74.125.236.49
www.google.com.         286     IN      A       74.125.236.52
www.google.com.         286     IN      A       74.125.236.48
www.google.com.         286     IN      A       74.125.236.51
www.google.com.         286     IN      A       74.125.236.50

;; Query time: 0 msec
;; SERVER: 10.40.4.247#53(10.40.4.247)
;; WHEN: Wed Dec 17 16:04:04 2014
;; MSG SIZE  rcvd: 112

Tuesday, December 16, 2014

watch command

I just came across this command where I wanted to look at the size of my file which I was expecting to go to many GBs, and was curious to look at the progress. It is very easy to use:

watch --interval=1 du allFiles.txt











this command can be used with any Linux Command e.g. "watch ls" will show you if new contents are arriving in the directory for which you are running the ls command. Default interval is 2 sec but you can tailor it to suit your needs.