snipt

Ctrl+h for KB shortcuts

Bash

unix / linux directory tree

ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/   /' -e 's/-/|/' 
https://snipt.net/embed/1e6cc974ab23c7be46253a69cb87b908/
/raw/1e6cc974ab23c7be46253a69cb87b908/
1e6cc974ab23c7be46253a69cb87b908
bash
Bash
1
2019-06-16T05:14:31
True
False
False
/api/public/snipt/3319/
unix-linux-directory-tree
<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></span><span id="L-1"><a name="L-1"></a>ls -R <span class="p">|</span> grep <span class="s2">&quot;:</span>$<span class="s2">&quot;</span> <span class="p">|</span> sed -e <span class="s1">&#39;s/:$//&#39;</span> -e <span class="s1">&#39;s/[^-][^\/]*\//--/g&#39;</span> -e <span class="s1">&#39;s/^/ /&#39;</span> -e <span class="s1">&#39;s/-/|/&#39;</span> </span></pre></div> </td></tr></table>
bash, mac, osx, unix

Bash

flush dns cache on mac os x

dscacheutil -flushcache
https://snipt.net/embed/897f9fed597be095e04359b2c24fd166/
/raw/897f9fed597be095e04359b2c24fd166/
897f9fed597be095e04359b2c24fd166
bash
Bash
1
2019-06-04T11:00:11
True
False
False
/api/public/snipt/2639/
flush-dns-cache-on-mac-os-x
<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></span><span id="L-1"><a name="L-1"></a>dscacheutil -flushcache </span></pre></div> </td></tr></table>
bash, mac, osx

Bash

create a directory from within the command prompt on unix or mac os x

mkdir django-projects
https://snipt.net/embed/3408dabaac8ebd89ca0064301601443b/
/raw/3408dabaac8ebd89ca0064301601443b/
3408dabaac8ebd89ca0064301601443b
bash
Bash
1
2019-06-16T17:16:01
True
False
False
/api/public/snipt/2307/
create-a-directory-from-within-the-command-prompt-on-unix-or-mac-os-x
<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></span><span id="L-1"><a name="L-1"></a>mkdir django-projects </span></pre></div> </td></tr></table>
bash, mac, osx, unix