snipt

Ctrl+h for KB shortcuts

Bash

Convert epoch to Human Readable date

date -d @1365063840
Thu Apr  4 10:24:00 CEST 2013
https://snipt.net/embed/c5dc3f9efda88320e8a6a20de2e82b1a/
/raw/c5dc3f9efda88320e8a6a20de2e82b1a/
c5dc3f9efda88320e8a6a20de2e82b1a
bash
Bash
2
2019-06-26T05:20:07
True
False
False
Apr 04, 2013 at 05:04 AM
/api/public/snipt/58775/
convert-epoch-to-human-readable-date
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>date -d @1365063840 </span><span id="L-2"><a name="L-2"></a>Thu Apr <span class="m">4</span> 10:24:00 CEST 2013 </span></pre></div> </td></tr></table>
date, unix

Bash

Restart of SSH Connections

pstree -cpal | egrep [s]shd | perl -lne '($i)=(/(\d+)/); `kill -1 $i`'
https://snipt.net/embed/8f8b6190734e8065fec2cd0b33808997/
/raw/8f8b6190734e8065fec2cd0b33808997/
8f8b6190734e8065fec2cd0b33808997
bash
Bash
1
2019-06-25T18:07:23
True
False
False
Dec 20, 2012 at 05:53 AM
/api/public/snipt/52131/
restart-of-ssh-connections
<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>pstree -cpal <span class="p">|</span> egrep <span class="o">[</span>s<span class="o">]</span>shd <span class="p">|</span> perl -lne <span class="s1">&#39;($i)=(/(\d+)/); `kill -1 $i`&#39;</span> </span></pre></div> </td></tr></table>
restart, ssh, unix

VimL

Remove ^M Charecters with VIM

:%s/.$//
https://snipt.net/embed/9e3df109797c89504c50a022b159431c/
/raw/9e3df109797c89504c50a022b159431c/
9e3df109797c89504c50a022b159431c
vim
VimL
1
2019-06-25T18:07:28
True
False
False
/api/public/snipt/18690/
remove-m-charecters-with-vim
<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><span class="p">:</span>%s<span class="sr">/.$/</span>/ </span></pre></div> </td></tr></table>
^m, vim

Bash

fuser example

1
2
3
coloso01:/proc/24105 # fuser 80/tcp
here: 80
80/tcp:               1178  2540  5879  7229  9874  9902  9903  9932  9933  9934  9936 14346 15760 17073 22388 24105 24386 25061
https://snipt.net/embed/ac069aaa70b683695d045780155b8dd7/
/raw/ac069aaa70b683695d045780155b8dd7/
ac069aaa70b683695d045780155b8dd7
bash
Bash
3
2019-06-26T03:54:26
True
False
False
/api/public/snipt/14609/
fuser-example
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>coloso01:/proc/24105 <span class="c1"># fuser 80/tcp</span> </span><span id="L-2"><a name="L-2"></a>here: 80 </span><span id="L-3"><a name="L-3"></a>80/tcp: <span class="m">1178</span> <span class="m">2540</span> <span class="m">5879</span> <span class="m">7229</span> <span class="m">9874</span> <span class="m">9902</span> <span class="m">9903</span> <span class="m">9932</span> <span class="m">9933</span> <span class="m">9934</span> <span class="m">9936</span> <span class="m">14346</span> <span class="m">15760</span> <span class="m">17073</span> <span class="m">22388</span> <span class="m">24105</span> <span class="m">24386</span> 25061 </span></pre></div> </td></tr></table>
fuser

Bash

Get Oracle info from Unix System

set | grep -i oracle
https://snipt.net/embed/f6fa11b76b19b0dc8853f1fea7695514/
/raw/f6fa11b76b19b0dc8853f1fea7695514/
f6fa11b76b19b0dc8853f1fea7695514
bash
Bash
1
2019-06-26T03:16:07
True
False
False
/api/public/snipt/14608/
get-oracle-info-from-unix-system
<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><span class="nb">set</span> <span class="p">|</span> grep -i oracle </span></pre></div> </td></tr></table>
bash

Text only

Windows NET commands

1
2
3
4
5
6
7
8
Actualizar IPs:

ipconfig /renew
ipconfig /release

Actualizar políticas del sistema:

gpupdate /force
https://snipt.net/embed/9112cd674d039a8358838ff897766b62/
/raw/9112cd674d039a8358838ff897766b62/
9112cd674d039a8358838ff897766b62
text
Text only
8
2019-06-25T18:07:59
True
False
False
/api/public/snipt/14398/
windows-net-commands
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>Actualizar IPs: </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>ipconfig /renew </span><span id="L-4"><a name="L-4"></a>ipconfig /release </span><span id="L-5"><a name="L-5"></a> </span><span id="L-6"><a name="L-6"></a>Actualizar políticas del sistema: </span><span id="L-7"><a name="L-7"></a> </span><span id="L-8"><a name="L-8"></a>gpupdate /force </span></pre></div> </td></tr></table>
commands, net, windows

Perl

Check if Perl has a modle installed

perl -MRRDs -le 'print q(ok!)'
https://snipt.net/embed/236ec4d13652b7f62b1f34de89a71bd5/
/raw/236ec4d13652b7f62b1f34de89a71bd5/
236ec4d13652b7f62b1f34de89a71bd5
perl
Perl
1
2019-06-25T18:08:07
True
False
False
/api/public/snipt/12258/
check-if-perl-has-a-modle-installed
<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><span class="n">perl</span> <span class="o">-</span><span class="n">MRRDs</span> <span class="o">-</span><span class="ow">le</span> <span class="s">&#39;print q(ok!)&#39;</span> </span></pre></div> </td></tr></table>
"perl. check", installed, module