snipt

Ctrl+h for KB shortcuts

Bash

snmp test

1
2
3
4
5
#centos/redhat snmp packages
yum -y install net-snmp-utils net-snmp

# testing
snmpwalk -v 1 -c [COMMUNITY] [IP] IP-MIB::ipAdEntIfIndex
https://snipt.net/embed/8292962cc11c1c4a41dd2ea5fe52607f/
/raw/8292962cc11c1c4a41dd2ea5fe52607f/
8292962cc11c1c4a41dd2ea5fe52607f
bash
Bash
6
2019-08-21T17:39:54
True
False
False
/api/public/snipt/10019/
snmp-test
<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></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="c1">#centos/redhat snmp packages</span> </span><span id="L-2"><a name="L-2"></a>yum -y install net-snmp-utils net-snmp </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a><span class="c1"># testing</span> </span><span id="L-5"><a name="L-5"></a>snmpwalk -v <span class="m">1</span> -c <span class="o">[</span>COMMUNITY<span class="o">]</span> <span class="o">[</span>IP<span class="o">]</span> IP-MIB::ipAdEntIfIndex </span></pre></div> </td></tr></table>
centos, redhat, snmp

Bash

Extract Source from RPM

1
2
3
4
mkdir test
cd test
wget http://mysite.com/files/packages/appp-1.0.x86_64.rpm
rpm2cpio appp-1.0.x86_64.rpm | cpio -idmv
https://snipt.net/embed/3892353baced23ad40d4f5fdcfff3668/
/raw/3892353baced23ad40d4f5fdcfff3668/
3892353baced23ad40d4f5fdcfff3668
bash
Bash
4
2019-08-21T17:00:35
True
False
False
/api/public/snipt/5570/
extract-source-from-rpm
<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></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>mkdir <span class="nb">test</span> </span><span id="L-2"><a name="L-2"></a><span class="nb">cd</span> <span class="nb">test</span> </span><span id="L-3"><a name="L-3"></a>wget http://mysite.com/files/packages/appp-1.0.x86_64.rpm </span><span id="L-4"><a name="L-4"></a>rpm2cpio appp-1.0.x86_64.rpm <span class="p">|</span> cpio -idmv </span></pre></div> </td></tr></table>
bash, centos, linux, redhat, rpm