snipt

Ctrl+h for KB shortcuts

Bash

Commands to change server's files and folders to 664 and 775 permissions

find /path/to/folder/ -type f -exec chmod 664 {} \;
find /path/to/folder/ -type d -exec chmod 775 {} \;
https://snipt.net/embed/b9cc0a6f29db6919af50cd3cf092a717/
https://snipt.net/raw/b9cc0a6f29db6919af50cd3cf092a717/
b9cc0a6f29db6919af50cd3cf092a717
bash
Bash
2
2016-07-20T13:28:13
True
False
True
Apr 02, 2014 at 12:12 PM
/api/public/snipt/126790/
commands-to-change-servers-files-and-folders-to-664-and-775-permissions
<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 /path/to/folder/ -type f -exec chmod <span class="m">664</span> <span class="o">{}</span> <span class="se">\;</span> </span><span id="L-2"><a name="L-2"></a>find /path/to/folder/ -type d -exec chmod <span class="m">775</span> <span class="o">{}</span> <span class="se">\;</span> </span></pre></div> </td></tr></table>
664, 775, linux, server

Shell Session

Mount remote server drive with OSXFUSE and ssh

sshfs [-p PORT-NUMBER] USERNAME@MYDOMAIN.com:/remote/path /Local/Path/to/an/existing/folder
https://snipt.net/embed/178080a463bae7bdfcf47a9de1f1fd0b/
https://snipt.net/raw/178080a463bae7bdfcf47a9de1f1fd0b/
178080a463bae7bdfcf47a9de1f1fd0b
shell-session
Shell Session
1
2016-07-24T23:49:21
True
False
False
Feb 05, 2014 at 09:52 AM
/api/public/snipt/111141/
mount-remote-server-drive-with-osxfuse-and-ssh
<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><span class="go">sshfs [-p PORT-NUMBER] USERNAME@MYDOMAIN.com:/remote/path /Local/Path/to/an/existing/folder</span> </span></pre></div> </td></tr></table>
commandline, mac, server, ssh, terminal

Bash

Ubuntu 12.04 LAMP server up and running with phpmyadmin installed nice and quick!

1
2
3
4
5
6
7
8
#!/bin/bash
sudo apt-get install mysql-server mysql-client
sudo apt-get install apache2
sudo apt-get install php5 libapache2-mod-php5
sudo /etc/init.d/apache2 restart
sudo apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
sudo /etc/init.d/apache2 restart
sudo apt-get install phpmyadmin
https://snipt.net/embed/b8fde2488c189d048f085351633ade5a/
https://snipt.net/raw/b8fde2488c189d048f085351633ade5a/
b8fde2488c189d048f085351633ade5a
bash
Bash
8
2016-07-22T13:01:57
True
False
False
/api/public/snipt/90070/
ubuntu-1204-lamp-server-up-and-running-with-phpmyadmin-installed-nice-and-quick
<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 id="L-1"><a name="L-1"></a><span class="c">#!/bin/bash</span> </span><span id="L-2"><a name="L-2"></a>sudo apt-get install mysql-server mysql-client </span><span id="L-3"><a name="L-3"></a>sudo apt-get install apache2 </span><span id="L-4"><a name="L-4"></a>sudo apt-get install php5 libapache2-mod-php5 </span><span id="L-5"><a name="L-5"></a>sudo /etc/init.d/apache2 restart </span><span id="L-6"><a name="L-6"></a>sudo apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl </span><span id="L-7"><a name="L-7"></a>sudo /etc/init.d/apache2 restart </span><span id="L-8"><a name="L-8"></a>sudo apt-get install phpmyadmin </span></pre></div> </td></tr></table>
apache2, install, lamp, mysql, php, server

Bash

SCP file from local to remote server over ssh using pem key

scp -i /path/to/key.pem /path/to/file.jpg <username>@<server ip address>:/path/to/place/file
https://snipt.net/embed/e1839c5e3d32b62b6ee527d714e4b2f8/
https://snipt.net/raw/e1839c5e3d32b62b6ee527d714e4b2f8/
e1839c5e3d32b62b6ee527d714e4b2f8
bash
Bash
1
2016-07-25T23:41:42
True
False
False
/api/public/snipt/87287/
scp-file-from-local-to-remote-server-over-ssh-using-pem-key
<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>scp -i /path/to/key.pem /path/to/file.jpg &lt;username&gt;@&lt;server ip address&gt;:/path/to/place/file </span></pre></div> </td></tr></table>
copy, file, local, remote, scp, server, ssh, to
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.