snipt

Ctrl+h for KB shortcuts

Bash

osx > flush dns cache

$ dscacheutil -flushcache
https://snipt.net/embed/8139c2018d1c4f8176780099894617cf/
https://snipt.net/raw/8139c2018d1c4f8176780099894617cf/
8139c2018d1c4f8176780099894617cf
bash
Bash
1
2016-09-27T17:33:19
True
False
False
Aug 04, 2013 at 02:13 PM
/api/public/snipt/71809/
osx-flush-dns-cache
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="nv">$ </span>dscacheutil -flushcache </span></pre></div> </td></tr></table>
cache, dns, osx

Bash

get a list of dns root servers

dnsip `dnsqr ns . | awk '/answer:/ { print $5 ; }' | sort`
https://snipt.net/embed/e2fb96c47417702fc1a36d2821d767d5/
https://snipt.net/raw/e2fb96c47417702fc1a36d2821d767d5/
e2fb96c47417702fc1a36d2821d767d5
bash
Bash
1
2016-09-26T23:49:27
True
False
False
/api/public/snipt/27981/
get-a-list-of-dns-root-servers
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>dnsip <span class="sb">`</span>dnsqr ns . <span class="p">|</span> awk <span class="s1">&#39;/answer:/ { print $5 ; }&#39;</span> <span class="p">|</span> sort<span class="sb">`</span> </span></pre></div> </td></tr></table>
djbdns, dns, root

Bash

Find SMTP server

dig +nocmd $DOMAIN MX +noall +answer | awk '{print $5 " " $6}' | sort  -n | awk '{print substr($2,1,length($2)-1) " " $1 }'
https://snipt.net/embed/34e75d3e86034660caa8f3dcd4c20963/
https://snipt.net/raw/34e75d3e86034660caa8f3dcd4c20963/
34e75d3e86034660caa8f3dcd4c20963
bash
Bash
1
2016-09-24T02:15:20
True
False
False
/api/public/snipt/26901/
find-smtp-server
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>dig +nocmd <span class="nv">$DOMAIN</span> MX +noall +answer <span class="p">|</span> awk <span class="s1">&#39;{print $5 &quot; &quot; $6}&#39;</span> <span class="p">|</span> sort -n <span class="p">|</span> awk <span class="s1">&#39;{print substr($2,1,length($2)-1) &quot; &quot; $1 }&#39;</span> </span></pre></div> </td></tr></table>
dig, dns, mail, smtp
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.