<?xml version="1.0"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
   <channel>
      <pubDate>Fri, 29 Aug 2008 22:12:57 GMT</pubDate>
      <lastBuildDate>Fri, 29 Aug 2008 22:12:57 GMT</lastBuildDate>
      <language>en</language>
      <docs>http://www.rssboard.org/rss-specification</docs>
      <title>CrunchBang ~ terminal</title>
      <link>http://crunchbang.org/tags/terminal/</link>
      <description>Code, Design &amp; GNU/Linux</description>

<item>
    <title>rpl - A Find &amp; Replace Terminal Tool</title>
    <link>http://crunchbang.org/archives/2008/04/20/rpl-a-find-and-replace-terminal-tool/</link>
    <pubDate>Sun, 20 Apr 2008 02:34:48 GMT</pubDate>
    <dc:creator>Philip Newborough</dc:creator>
    <guid>http://crunchbang.org/archives/2008/04/20/rpl-a-find-and-replace-terminal-tool/</guid>
    <description><![CDATA[
    <p>Tonight I have mainly been working on <a href="http://crunchbang.org/projects/whird/ " title="Project page for Whird.">Whird</a>. I have been rewriting large chunks of code in an effort to optimise a bunch of functions. As a result of this, I had to change a series of strings in a number of files. As per normal when it comes to fiddly <a href="http://en.wikipedia.org/wiki/Grep " title="Wikipedia - grep">grep</a>, <a href="http://en.wikipedia.org/wiki/Sed " title="Wikipedia - sed">sed</a> and <a href="http://en.wikipedia.org/wiki/Awk " title="Wikipedia - awk">awk</a> commands, I fired up Google and searched for some pointers. Whilst refreshing my memory, I came across a comment by an anonymous reader who suggested using the <code>rpl</code> command.</p>

<p>I had not previously come across <a href="http://www.laffeycomputer.com/rpl.html " title="rpl - Replace Strings - from Laffey Computer Imaging">rpl</a> before, so I investigated. Turns out that rpl is a really handy text replacement tool &#8212; it makes recursive text replacement commands really simple; as simple as:</p>

<pre><code>rpl [options] old_string new_string target_file(s)
</code></pre>

<p>Available options are:</p>

<pre><code>--version          show program's version number and exit
-h, --help         show this help message and exit
-L, --license      show the software license
-x SUFFIX          specify file suffix to match
-i, --ignore-case  do a case insensitive match
-w, --whole-words  whole words (old_string matches on word boundaries only)
-b, --backup       make a backup before overwriting files
-q, --quiet        quiet mode
-v, --verbose      verbose mode
-s, --dry-run      simulation mode
-R, --recursive    recurse into subdirectories
-e, --escape       expand escapes in old_string and new_string
-p, --prompt       prompt before modifying each file
-f, --force        ignore errors when trying to preserve permissions
-d, --keep-times   keep the modification times on modified files
-t, --use-tmpdir   use $TMPDIR for storing temporary files
-a, --all          do not ignore files and directories starting with .
</code></pre>

<p>rpl is available to install from the <a href="http://packages.ubuntu.com/search?searchon=names&amp;keywords=rpl " title="Ubuntu Packages - rpl">Ubuntu repositories</a>, install with the following command:</p>

<pre><code>sudo apt-get install rpl
</code></pre>

<p>For more information about rpl, see: <a href="http://www.laffeycomputer.com/rpl.html " title="rpl - Replace Strings - from Laffey Computer Imaging">http://www.laffeycomputer.com/rpl.html</a></p>

    <p style="font-size:smaller;">Tags: <a href="http://crunchbang.org/tags/cli/" title="Browse all posts tagged with &#8220;cli&#8221;">cli</a>, <a href="http://crunchbang.org/tags/commands/" title="Browse all posts tagged with &#8220;commands&#8221;">commands</a>, <a href="http://crunchbang.org/tags/software/" title="Browse all posts tagged with &#8220;software&#8221;">software</a>, <a href="http://crunchbang.org/tags/terminal/" title="Browse all posts tagged with &#8220;terminal&#8221;">terminal</a>, <a href="http://crunchbang.org/tags/ubuntu/" title="Browse all posts tagged with &#8220;ubuntu&#8221;">ubuntu</a>, <a href="http://crunchbang.org/tags/whird/" title="Browse all posts tagged with &#8220;whird&#8221;">whird</a></p>
    ]]></description>
</item>

<item>
    <title>Create MySQL User Accounts from the Command Line</title>
    <link>http://crunchbang.org/archives/2008/04/17/create-mysql-user-accounts-from-the-command-line/</link>
    <pubDate>Thu, 17 Apr 2008 10:55:15 GMT</pubDate>
    <dc:creator>Philip Newborough</dc:creator>
    <guid>http://crunchbang.org/archives/2008/04/17/create-mysql-user-accounts-from-the-command-line/</guid>
    <description><![CDATA[
    <p>I have my <a href="http://crunchbang.org/archives/2008/01/10/apache-mysql-and-php-on-ubuntu/ " title="Linux, Apache, MySQL and PHP on Ubuntu.">LAMP</a> install process down to fine art, which is a good thing considering the amount of Linux installs I have been performing lately. Anyhow, just recently I have been experiencing some issues with creating <a href="http://en.wikipedia.org/wiki/Mysql " title="Wikipedia - MySQL">MySQL</a> user accounts. Normally, for ease of use, I would simply login to <a href="http://en.wikipedia.org/wiki/Phpmyadmin " title="Wikipedia - phpMyAdmin">phpMyAdmin</a> and create a new user account, but, for some unknown reason, this method has not been working; maybe there is a compatibility issue between the latest versions of MySQL Server and phpMyAdmin available from the <a href="http://www.ubuntu.com/ " title="Ubuntu, Linux for human beings.">Ubuntu</a> repositories?</p>

<p>Anyway, to get around this little problem, I have been creating new MySQL user accounts via the command line. It is a fairly straightforward procedure, but like a lot of administration tasks, it is not something I do on a daily basis. With this in mind, I thought it would be a good idea to record the process for future reference.</p>

<p>Follow the steps below to create a new user MySQL account. Note, these instructions assume that you have already <a href="http://crunchbang.org/archives/2008/01/10/apache-mysql-and-php-on-ubuntu/ " title="Apache, MySQL and PHP on Ubuntu.">set-up Apache, MySQL and PHP</a>.</p>

<p><strong>1.</strong> Open a terminal and login to MySQL as root:</p>

<pre><code>mysql --user="root" --password="your_root_password"
</code></pre>

<p><strong>2.</strong> Create a new user and password with the following command:</p>

<pre><code>CREATE USER 'new_username'@'localhost' IDENTIFIED BY 'password_for_new_username';
</code></pre>

<p><strong>3.</strong> Assign privileges to the new user, enter the command:</p>

<pre><code>GRANT ALL ON *.* TO 'new_username'@'localhost';
</code></pre>

<p><strong>4.</strong> Exit MySQL interface, enter:</p>

<pre><code>exit
</code></pre>

<p><strong>Notes:</strong> The above instructions will create a new user account on &#34;localhost&#34; and grant the user all privileges. While this is safe for my development environment, you would obviously want to grant only the necessary permissions in a production environment.</p>

<p>For more developer information, including the MySQL Reference Manual, visit: <a href="http://dev.mysql.com/ " title="MySQL developer information.">http://dev.mysql.com/</a></p>

    <p style="font-size:smaller;">Tags: <a href="http://crunchbang.org/tags/mysql/" title="Browse all posts tagged with &#8220;mysql&#8221;">mysql</a>, <a href="http://crunchbang.org/tags/phpmyadmin/" title="Browse all posts tagged with &#8220;phpmyadmin&#8221;">phpmyadmin</a>, <a href="http://crunchbang.org/tags/terminal/" title="Browse all posts tagged with &#8220;terminal&#8221;">terminal</a>, <a href="http://crunchbang.org/tags/ubuntu/" title="Browse all posts tagged with &#8220;ubuntu&#8221;">ubuntu</a></p>
    ]]></description>
</item>

<item>
    <title>Configure Wireless on the Command Line</title>
    <link>http://crunchbang.org/archives/2007/12/18/configure-wireless-on-the-command-line/</link>
    <pubDate>Tue, 18 Dec 2007 23:06:13 GMT</pubDate>
    <dc:creator>Philip Newborough</dc:creator>
    <guid>http://crunchbang.org/archives/2007/12/18/configure-wireless-on-the-command-line/</guid>
    <description><![CDATA[
    <p>Today I have mainly been attempting to create a very light installation of <a href="http://www.ubuntu.com/ " title="Ubuntu, Linux for Human Beings!">Ubuntu</a> on an old Pentium III. I started by installing a base system with the Ubuntu alternative install disk. After the base system was installed I then tried to configure my wireless card from the command line. I was half expecting this to be a difficult task, however it wasn&#39;t actually too difficult and thanks to some rather <a href="http://www.stoltenow.com/archives/2006/12/ubuntu_configur.html " title="Ubuntu: Configure Wireless From The Command Line">nifty instructions</a> I managed to get my wireless card working in no time. For future reference here are the necessary commands:</p>

<p><strong>1.</strong> Turn the interface on with the following command:</p>

<pre><code>sudo ifconfig wlan0 up
</code></pre>

<p><strong>2.</strong> Scan for a list of all the available access points:</p>

<pre><code>iwlist wlan0 scanning
</code></pre>

<p><strong>3.</strong> Select the access point with the following command:</p>

<pre><code>sudo iwconfig wlan0 essid ACCESSPOINT
</code></pre>

<p><strong>4.</strong> Set WEP or WPA passphrase, if needed:</p>

<pre><code>sudo iwconfig wlan0 key PASSPHRASE
</code></pre>

<p><strong>5.</strong> Finally, connect to DHCP server and obtain an IP address:</p>

<pre><code>sudo dhclient
</code></pre>

<p>I&#39;ll post more details about the actual system install when I get more time, for now I just wanted to get these instructions down in case I end up having to start again from scratch.</p>

    <p style="font-size:smaller;">Tags: <a href="http://crunchbang.org/tags/cli/" title="Browse all posts tagged with &#8220;cli&#8221;">cli</a>, <a href="http://crunchbang.org/tags/networking/" title="Browse all posts tagged with &#8220;networking&#8221;">networking</a>, <a href="http://crunchbang.org/tags/terminal/" title="Browse all posts tagged with &#8220;terminal&#8221;">terminal</a>, <a href="http://crunchbang.org/tags/ubuntu/" title="Browse all posts tagged with &#8220;ubuntu&#8221;">ubuntu</a></p>
    ]]></description>
</item>

<item>
    <title>PuTTY SSH Client for Nokia N95</title>
    <link>http://crunchbang.org/archives/2007/12/16/putty-ssh-client-for-nokia-n95/</link>
    <pubDate>Sun, 16 Dec 2007 00:24:48 GMT</pubDate>
    <dc:creator>Philip Newborough</dc:creator>
    <guid>http://crunchbang.org/archives/2007/12/16/putty-ssh-client-for-nokia-n95/</guid>
    <description><![CDATA[
    <p>Tonight I have mainly been playing with <a href="http://s2putty.sourceforge.net/ " title="PuTTY for Symbian OS">PuTTY for Symbian OS</a>, an <a href="http://en.wikipedia.org/wiki/Secure_Shell " title="Wikipedia - Secure Shell">SSH client</a> for my new <a href="http://crunchbang.org/archives/2007/12/14/my-new-nokia-n95-smartphone/ " title="CrunchBang - My New Nokia N95 Smartphone">Nokia N95</a>. After figuring out the correct version to download, there are several versions available for the different editions of Symbian, the installation was super easy and simply consisted of clicking a few confirmation buttons. By the way, the correct version for the Nokia N95 is the <a href="http://prdownloads.sourceforge.net/s2putty/putty_s60v3_1.4beta1_20070303.zip?download " title="Download PuTTY for the Nokia N95.">S60 third edition</a>.</p>

<p>Regarding usage, I found using PuTTY on my mobile phone to be a somewhat fiddly experience, mainly due to the fact that I have pig tits for fingers. Having said that, I can&#39;t really fault the software. Anyone with any experience of using an SSH client shouldn&#39;t experience any difficulties and should be able to get a connection up within a minute or two; I connected to one of my <a href="http://www.ubuntu.com/ " title="Ubuntu, Linux for human beings!">Ubuntu</a> systems at home, impressive stuff, even if I do say so myself! For me, the ability to run an SSH client gives a whole new meaning to the term &#34;<a href="http://en.wikipedia.org/wiki/Smartphone " title="Wikipedia - Smartphone">smartphone</a>&#34;. Is there anything this phone can&#39;t do?</p>

    <p style="font-size:smaller;">Tags: <a href="http://crunchbang.org/tags/n95/" title="Browse all posts tagged with &#8220;n95&#8221;">n95</a>, <a href="http://crunchbang.org/tags/nokia/" title="Browse all posts tagged with &#8220;nokia&#8221;">nokia</a>, <a href="http://crunchbang.org/tags/ssh/" title="Browse all posts tagged with &#8220;ssh&#8221;">ssh</a>, <a href="http://crunchbang.org/tags/terminal/" title="Browse all posts tagged with &#8220;terminal&#8221;">terminal</a>, <a href="http://crunchbang.org/tags/ubuntu/" title="Browse all posts tagged with &#8220;ubuntu&#8221;">ubuntu</a></p>
    ]]></description>
</item>

<item>
    <title>CPU Temperature via Terminal</title>
    <link>http://crunchbang.org/archives/2007/09/24/cpu-temperature-via-terminal/</link>
    <pubDate>Mon, 24 Sep 2007 10:52:50 GMT</pubDate>
    <dc:creator>Philip Newborough</dc:creator>
    <guid>http://crunchbang.org/archives/2007/09/24/cpu-temperature-via-terminal/</guid>
    <description><![CDATA[
    <p>Enter the following command in your Linux terminal to get the current running temperature of your CPU.</p>

<pre><code>acpi -t
</code></pre>

<p>This is a handy command and one that I should be able to put to good use. My desktop is a little bit old and crusty and is forever overheating in the summer. It should be possible to use this command in conjunction with cron to set-up a warning system to let me know when my system is about to go into meltdown.</p>

<p>via the <a href="http://ubuntuforums.org/showpost.php?p=2540421&amp;postcount=1 " title="More useful terminal commands">Ubuntu Forums</a></p>

    <p style="font-size:smaller;">Tags: <a href="http://crunchbang.org/tags/cli/" title="Browse all posts tagged with &#8220;cli&#8221;">cli</a>, <a href="http://crunchbang.org/tags/commands/" title="Browse all posts tagged with &#8220;commands&#8221;">commands</a>, <a href="http://crunchbang.org/tags/linux/" title="Browse all posts tagged with &#8220;linux&#8221;">linux</a>, <a href="http://crunchbang.org/tags/terminal/" title="Browse all posts tagged with &#8220;terminal&#8221;">terminal</a></p>
    ]]></description>
</item>

 </channel>
</rss>