snipt

Ctrl+h for KB shortcuts

Bash

Sound problems in Ubuntu

sudo /etc/init.d/alsa-utils reset
/sbin/alsa force-reload
https://snipt.net/embed/dd3c4842645223134844d04531997c50/
/raw/dd3c4842645223134844d04531997c50/
dd3c4842645223134844d04531997c50
bash
Bash
2
2019-08-19T20:05:21
True
False
False
/api/public/snipt/11347/
sound-problems-in-ubuntu
<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>sudo /etc/init.d/alsa-utils reset </span><span id="L-2"><a name="L-2"></a>/sbin/alsa force-reload </span></pre></div> </td></tr></table>
bash, linux, problem, sound, ubuntu

Bash

Turn off the system speaker

rmmod pcspkr
https://snipt.net/embed/30202e5b1e69479701cebf438d6bef2f/
/raw/30202e5b1e69479701cebf438d6bef2f/
30202e5b1e69479701cebf438d6bef2f
bash
Bash
1
2019-08-17T23:54:50
True
False
False
/api/public/snipt/8650/
turn-off-the-system-speaker
<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>rmmod pcspkr </span></pre></div> </td></tr></table>
beep, disable, linux, speaker, ubuntu

Bash

tar a folder excluding svn metadata

tar cvf sdk.tar --exclude=\.svn sdk/
https://snipt.net/embed/73663da644ac50233be55f708ed8d14e/
/raw/73663da644ac50233be55f708ed8d14e/
73663da644ac50233be55f708ed8d14e
bash
Bash
1
2019-08-06T22:21:34
True
False
False
/api/public/snipt/7248/
tar-a-folder-excluding-svn-metadata
<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>tar cvf sdk.tar --exclude<span class="o">=</span><span class="se">\.</span>svn sdk/ </span></pre></div> </td></tr></table>
bash, exclude, metadata, svn, tar

Bash

print the list of local IP addresses from ifconfig

#/bin/sh
ifconfig | grep 'inet addr' | awk '{print $2}' | cut -f 2 -d ':' 
https://snipt.net/embed/7876306ff771e8d768e07540988a7dc0/
/raw/7876306ff771e8d768e07540988a7dc0/
7876306ff771e8d768e07540988a7dc0
bash
Bash
2
2019-08-20T19:09:12
True
False
False
/api/public/snipt/7133/
echo-address
<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><span class="c1">#/bin/sh</span> </span><span id="L-2"><a name="L-2"></a>ifconfig <span class="p">|</span> grep <span class="s1">&#39;inet addr&#39;</span> <span class="p">|</span> awk <span class="s1">&#39;{print $2}&#39;</span> <span class="p">|</span> cut -f <span class="m">2</span> -d <span class="s1">&#39;:&#39;</span> </span></pre></div> </td></tr></table>
address, awk, cut, grep, ifconfig, ip, shell