snipt

Ctrl+h for KB shortcuts

Bash

/etc/rc.local

1
2
3
4
5
#!/bin/bash -vx

printf "\n\t%s\n\n" "= ^ . ^ =" ;

exit 0 ;
https://snipt.net/embed/97f38af45166c63e4106a5df1a46ccab/
https://snipt.net/raw/97f38af45166c63e4106a5df1a46ccab/
97f38af45166c63e4106a5df1a46ccab
bash
Bash
5
2016-09-05T06:59:14
True
False
True
Mar 26, 2014 at 08:01 PM
/api/public/snipt/125103/
etcrclocal
<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 id="L-1"><a name="L-1"></a><span class="c">#!/bin/bash -vx</span> </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="nb">printf</span> <span class="s2">&quot;\n\t%s\n\n&quot;</span> <span class="s2">&quot;= ^ . ^ =&quot;</span> <span class="p">;</span> </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a><span class="nb">exit </span><span class="m">0</span> <span class="p">;</span> </span></pre></div> </td></tr></table>
Linux

Text only

Install htop in CentOS 5

1
2
3
 1) wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.i386.rpm 
 2) rpm -Uhv rpmforge-release-0.5.3-1.el5.rf.i386.rpm
 3) yum install htop
https://snipt.net/embed/d04a358770028214faaead597bbc085f/
https://snipt.net/raw/d04a358770028214faaead597bbc085f/
d04a358770028214faaead597bbc085f
text
Text only
3
2016-09-24T11:22:10
True
False
False
/api/public/snipt/120879/
install-htop-in-centos-5
<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 id="L-1"><a name="L-1"></a> 1) wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.i386.rpm </span><span id="L-2"><a name="L-2"></a> 2) rpm -Uhv rpmforge-release-0.5.3-1.el5.rf.i386.rpm </span><span id="L-3"><a name="L-3"></a> 3) yum install htop </span></pre></div> </td></tr></table>
CentOS, Linux, htop

Text only

Actualizar / desisntalar kernel ubuntu

Actualizar http://bitelia.com/2013/10/actualizar-el-kernel-de-linux
Desinstalar http://hatteras.wordpress.com/2008/02/16/desinstalar-kernerl/
https://snipt.net/embed/18e0e0c0c31796d0edf0805518a779f1/
https://snipt.net/raw/18e0e0c0c31796d0edf0805518a779f1/
18e0e0c0c31796d0edf0805518a779f1
text
Text only
2
2016-09-22T02:56:30
True
False
False
/api/public/snipt/119569/
actualizar-kernel-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 id="L-1"><a name="L-1"></a>Actualizar http://bitelia.com/2013/10/actualizar-el-kernel-de-linux </span><span id="L-2"><a name="L-2"></a>Desinstalar http://hatteras.wordpress.com/2008/02/16/desinstalar-kernerl/ </span></pre></div> </td></tr></table>
Linux, kernel

Text only

Switch between workspaces in Linux

1
2
3
4
5
6
7
Press Ctrl+Alt and an arrow key to switch workspaces.
Press Ctrl+Alt+Shift and an arrow key to shift a window to other workspace.
Press Ctrl+Alt+T to open a terminal.
Press Ctrl+Shift+T to open a tab in terminal.
Press Ctrl+l to clear terminal's screen.
!! - Execute the last command.
sudo !! -  Execute the last command as Root user.
https://snipt.net/embed/6ca0f79cd2e4cb129429fea36c15fc8d/
https://snipt.net/raw/6ca0f79cd2e4cb129429fea36c15fc8d/
6ca0f79cd2e4cb129429fea36c15fc8d
text
Text only
7
2016-09-23T22:06:40
True
False
True
Jan 28, 2014 at 08:46 AM
/api/public/snipt/109024/
switch-between-workspaces-in-linux
<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></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>Press Ctrl+Alt and an arrow key to switch workspaces. </span><span id="L-2"><a name="L-2"></a>Press Ctrl+Alt+Shift and an arrow key to shift a window to other workspace. </span><span id="L-3"><a name="L-3"></a>Press Ctrl+Alt+T to open a terminal. </span><span id="L-4"><a name="L-4"></a>Press Ctrl+Shift+T to open a tab in terminal. </span><span id="L-5"><a name="L-5"></a>Press Ctrl+l to clear terminal&#39;s screen. </span><span id="L-6"><a name="L-6"></a>!! - Execute the last command. </span><span id="L-7"><a name="L-7"></a>sudo !! - Execute the last command as Root user. </span></pre></div> </td></tr></table>
Linux

Text only

File sizes in human readable form

ls -lh
https://snipt.net/embed/6ea2596eaf1853f5d4641631c98ae677/
https://snipt.net/raw/6ea2596eaf1853f5d4641631c98ae677/
6ea2596eaf1853f5d4641631c98ae677
text
Text only
1
2016-09-23T10:50:36
True
False
True
Jan 28, 2014 at 08:27 AM
/api/public/snipt/109022/
file-sizes-in-human-readable-form
<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 id="L-1"><a name="L-1"></a>ls -lh </span></pre></div> </td></tr></table>
Linux

Text only

Change all directories to 755 and all files to 644

find . -type d -print0 | xargs -0 chmod 0775 # For directories
find . -type f -print0 | xargs -0 chmod 0664 # For files
https://snipt.net/embed/e99dcbe9ddf096ccab60fe40e413f177/
https://snipt.net/raw/e99dcbe9ddf096ccab60fe40e413f177/
e99dcbe9ddf096ccab60fe40e413f177
text
Text only
2
2016-09-22T02:57:02
True
False
False
Jan 27, 2014 at 11:41 AM
/api/public/snipt/108841/
change-all-directories-to-755-and-all-files-to-644
<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 id="L-1"><a name="L-1"></a>find . -type d -print0 | xargs -0 chmod 0775 # For directories </span><span id="L-2"><a name="L-2"></a>find . -type f -print0 | xargs -0 chmod 0664 # For files </span></pre></div> </td></tr></table>
Linux

Text only

Cahnge owner group for all files

chown -R web37:client9 *
https://snipt.net/embed/07e4c73bd7f40bda0d1d1620fbe7ced5/
https://snipt.net/raw/07e4c73bd7f40bda0d1d1620fbe7ced5/
07e4c73bd7f40bda0d1d1620fbe7ced5
text
Text only
1
2016-09-21T18:39:36
True
False
False
Jan 27, 2014 at 11:36 AM
/api/public/snipt/108837/
cahnge-owner-group-for-all-files
<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 id="L-1"><a name="L-1"></a>chown -R web37:client9 * </span></pre></div> </td></tr></table>
Linux, linux
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.