snipt

Ctrl+h for KB shortcuts

Bash

Remove all SVN directories

find . -name ".svn" -exec rm -rf {} \;
https://snipt.net/embed/897e9315554cd8098e8a9a79360e4f4b/
/raw/897e9315554cd8098e8a9a79360e4f4b/
897e9315554cd8098e8a9a79360e4f4b
bash
Bash
2
2019-07-29T05:40:50
True
False
False
/api/public/snipt/8232/
remove-all-svn-directories
<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>find . -name <span class="s2">&quot;.svn&quot;</span> -exec rm -rf <span class="o">{}</span> <span class="se">\;</span> </span></pre></div> </td></tr></table>
svn

Bash

Strip WebDeck Database of crud

sed -e '/INSERT INTO `sitetracker/d' ocn_cms_200902050918.sql | sed -e '/INSERT INTO `documentassetdata/d' | sed -e '/INSERT INTO `documentdownload/d' > ocn_stripped
https://snipt.net/embed/d565b94c26a991f0fd03e7e7d6bcdd3d/
/raw/d565b94c26a991f0fd03e7e7d6bcdd3d/
d565b94c26a991f0fd03e7e7d6bcdd3d
bash
Bash
1
2019-08-19T01:35:33
True
False
False
/api/public/snipt/2441/
strip-webdeck-database-of-crud
<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>sed -e <span class="s1">&#39;/INSERT INTO `sitetracker/d&#39;</span> ocn_cms_200902050918.sql <span class="p">|</span> sed -e <span class="s1">&#39;/INSERT INTO `documentassetdata/d&#39;</span> <span class="p">|</span> sed -e <span class="s1">&#39;/INSERT INTO `documentdownload/d&#39;</span> &gt; ocn_stripped </span></pre></div> </td></tr></table>
bash, webdeck

Bash

Kill process by name

ps axco pid,command | grep <process name> | awk '{ print $1; }' | xargs kill -9
https://snipt.net/embed/d1aab2f5f83d18ac7e40fbac06db72cb/
/raw/d1aab2f5f83d18ac7e40fbac06db72cb/
d1aab2f5f83d18ac7e40fbac06db72cb
bash
Bash
1
2019-08-15T20:54:45
True
False
False
/api/public/snipt/2279/
kill-by-name
<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>ps axco pid,command <span class="p">|</span> grep &lt;process name&gt; <span class="p">|</span> awk <span class="s1">&#39;{ print $1; }&#39;</span> <span class="p">|</span> xargs <span class="nb">kill</span> -9 </span></pre></div> </td></tr></table>
bash

Bash

Remove all CVS directories

find -d . -name 'CVS' -exec rm -rf '{}' \; -print
https://snipt.net/embed/00c3ad02c77db51a87335ae6837104c9/
/raw/00c3ad02c77db51a87335ae6837104c9/
00c3ad02c77db51a87335ae6837104c9
bash
Bash
1
2019-08-20T12:43:54
True
False
False
/api/public/snipt/1789/
remove-all-cvs-directories
<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>find -d . -name <span class="s1">&#39;CVS&#39;</span> -exec rm -rf <span class="s1">&#39;{}&#39;</span> <span class="se">\;</span> -print </span></pre></div> </td></tr></table>
cvs