<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Alex Sleat &#187; Command Line</title>
	<atom:link href="http://alexsleat.co.uk/category/linux/command-line/feed/" rel="self" type="application/rss+xml" />
	<link>http://alexsleat.co.uk</link>
	<description>/home/alex</description>
	<lastBuildDate>Tue, 07 Feb 2012 12:12:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Ubuntu 11.10 Proxy Settings</title>
		<link>http://alexsleat.co.uk/2012/01/24/ubuntu-11-10-proxy-settings/</link>
		<comments>http://alexsleat.co.uk/2012/01/24/ubuntu-11-10-proxy-settings/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 17:18:38 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[11.10]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[apt-get install]]></category>
		<category><![CDATA[behind proxy]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[ftp_proxy]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[https_proxy]]></category>
		<category><![CDATA[http_proxy]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[UWE]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=27077</guid>
		<description><![CDATA[<br/>Temporary proxy: <p>Where proxy.addr is the proxy address, 4040 is the port number. Some proxies may require &#8220;http://&#8221; before the address.</p> export http_proxy &#34;proxy.addr:4040&#34; export ftp_proxy &#34;proxy.addr:4040&#34; export https_proxy &#34;proxy.addr:4040&#34; <p>If you run this in a terminal, any programs opened from that terminal will adhere to the proxy you set but any other applications [...]]]></description>
			<content:encoded><![CDATA[<br/><h5>Temporary proxy:</h5>
<p><em>Where proxy.addr is the proxy address, 4040 is the port number. Some proxies may require &#8220;http://&#8221; before the address.</em></p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw3">export</span> http_proxy <span class="st0">&quot;proxy.addr:4040&quot;</span><br />
<span class="kw3">export</span> ftp_proxy <span class="st0">&quot;proxy.addr:4040&quot;</span><br />
<span class="kw3">export</span> https_proxy <span class="st0">&quot;proxy.addr:4040&quot;</span></div>
<p>If you run this in a terminal, any programs opened from that terminal will adhere to the proxy you set but any other applications will not. This makes it useful if you just want to launch a browser for a quick browsing session but don&#8217;t need the whole system to access the internet.</p>
<p>If you do need your entire system to access the network, you can add these to the bottom of &#8220;~/.bashrc&#8221; this will enable any new programs running and the whole system (after a restart) to use the settings. Essentially ~/.bashrc are commands run when a terminal is opened.</p>
<p><strong>NOTE:</strong> If you do this, when you remove them your machine will likely need a restart to undo the changes.</p>
<hr/>
<h5> Proxy with login </h5>
<p>If your proxy server requires a login, this is an addition of the above however the syntax is as follows:</p>
<div class="dean_ch" style="white-space: wrap;">user:pass@proxy.addr:<span class="nu0">4040</span></div>
<hr/>
<h5>APT Proxy:</h5>
<p>APT (used for system updates) has its own proxy settings, which seem to ignore the above settings.</p>
<p><em>Where nano is the editor, if you prefer use a graphical one such as gedit, kedit etc.</em></p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">sudo</span> <span class="kw2">nano</span> /etc/apt/apt.conf.d/02proxy</div>
<p>add:</p>
<div class="dean_ch" style="white-space: wrap;">Acquire::http::Proxy <span class="st0">&quot;http://proxy.addr:4040&quot;</span>;</div>
<p style="text-align: right;">Source : <a href="http://naveenubuntu.blogspot.com/2011/09/updating-packages-behind-prxy-in-ubuntu.html">http://naveenubuntu.blogspot.com/2011/09/updating-packages-behind-prxy-in-ubuntu.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2012/01/24/ubuntu-11-10-proxy-settings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux USB Errors with usb-creator-gtk &#8220;stdin: I/O error stdin: error 0 /init: line 1: can&#8217;t open /dev/sr0: No medium found&#8221;</title>
		<link>http://alexsleat.co.uk/2011/11/26/linux-usb-errors-with-usb-creator-gtk-stdin-io-error-stdin-error-0-init-line-1-cant-open-devsr0-no-medium-found/</link>
		<comments>http://alexsleat.co.uk/2011/11/26/linux-usb-errors-with-usb-creator-gtk-stdin-io-error-stdin-error-0-init-line-1-cant-open-devsr0-no-medium-found/#comments</comments>
		<pubDate>Sat, 26 Nov 2011 14:29:01 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blog1]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linuxmint]]></category>
		<category><![CDATA[live usb]]></category>
		<category><![CDATA[mint]]></category>
		<category><![CDATA[opensuse]]></category>
		<category><![CDATA[pen drive]]></category>
		<category><![CDATA[persistence]]></category>
		<category><![CDATA[stdin I/O error]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[unetbootin]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=24181</guid>
		<description><![CDATA[<br/><p>After installing Ubuntu on a USB stick with the Ubuntu USB Startup Disk Creator (usb-creator-gtk) you might encounter an error such as the following:</p> stdin: I/O error stdin: error 0 /init: line 1: can&#8216;t open /dev/sr0: No medium found <p>This is actually a bug with the software and isn&#8217;t anything you&#8217;ve done wrong. It [...]]]></description>
			<content:encoded><![CDATA[<br/><p>After installing Ubuntu on a USB stick with the Ubuntu USB Startup Disk Creator (usb-creator-gtk) you might encounter an error such as the following:</p>
<div class="dean_ch" style="white-space: wrap;">stdin: I/O error<br />
stdin: error <span class="nu0">0</span><br />
/init: line <span class="nu0">1</span>: can<span class="st0">&#8216;t open /dev/sr0: No medium found</span></div>
<p>This is actually a <a href="https://bugs.launchpad.net/ubuntu/+bug/500822">bug</a> with the software and isn&#8217;t anything you&#8217;ve done wrong. It seems to be a bug that&#8217;s effecting users running Karmic, Lucid, Maverick and Natty so it&#8217;s a pretty wide spread issue.</p>
<p>The best way I have found to get around this issue is to install and run <a href="http://unetbootin.sourceforge.net">unetbootin</a> to create live USBs. If you&#8217;re using linux it should be found in the usual place you can install things.</p>
<h6>Installation:</h6>
<p><strong>Ubuntu/LinuxMint/Debian:</strong></p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">sudo</span> apt-get <span class="kw2">install</span> unetbootin</div>
<p><strong>Fedora/OpenSuse:</strong></p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">sudo</span> yum <span class="kw2">install</span> unetbootin</div>
<h6>Create a live USB:</h6>
<p>To install a distro it&#8217;s pretty simple, either select it from the &#8220;Distribution&#8221; option and pick a distribution and version, UNetbootin will then actually download it and install it for you. Alternatively you can pick an Diskimage and browse for the ISO file you download (and would usually burn to a CD/DVD) and install from that. Select the USB Drive at the bottom and hit ok and it&#8217;ll install a bootloader, the system and you&#8217;ll be up and running in no time.</p>
<p><a href="http://alexsleat.co.uk/wp-content/uploads/2011/11/Screenshot-UNetbootin.png"><img class="aligncenter size-full wp-image-24182" title="Screenshot-UNetbootin" src="http://alexsleat.co.uk/wp-content/uploads/2011/11/Screenshot-UNetbootin.png" alt="" width="530" height="387" /></a></p>
<h6>Persistence File:</h6>
<p>If you wanted a persistence install which allows you to save files, settings and installed programs you&#8217;ll have to do a little manual work as it currently doesn&#8217;t support that option.</p>
<p>Go to <a href="http://unetbootin.sourceforge.net/diskimg/">http://unetbootin.sourceforge.net/diskimg/</a> and download one of the files (128mb.zip, 256mb.zip, or 512mb.zip) corresponding to the amount of persistent space you want (make sure the size of the persistent disk image is smaller than the free space you have on your USB drive).</p>
<p>You&#8217;ll then need to edit the syslinux.cfg file that was created by UNetbootin in the root of the directory (just open it with a text editor) you should see something similar to the following:</p>
<blockquote><p>label unetbootindefault<br />
menu label Default<br />
kernel /ubnkern<br />
append initrd=/ubninit file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash &#8211;</p></blockquote>
<p>So on the line that starts &#8220;appen initrd=&#8221; you&#8217;ll want to add the option of &#8220;persistent&#8221;, it should then look like the following:</p>
<p>NOTE: WordPress changes my double dash at the end of the last line to a single long dash, this won&#8217;t work. It&#8217;s easiest just to add the final word before the double dash in the file, do not copy and paste this in to your file. If you do, you will get more errors.</p>
<blockquote><p>label unetbootindefault<br />
menu label Default<br />
kernel /ubnkern<br />
append initrd=/ubninit file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash persistent &#8211;</p></blockquote>
<p>I added this line to all that used the &#8220;file=/cdrom/preseed/ubuntu.seed&#8221; option, since that&#8217;s the image that&#8217;s being opened and it should then change all options on the bootloader that will load the ubuntu install.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2011/11/26/linux-usb-errors-with-usb-creator-gtk-stdin-io-error-stdin-error-0-init-line-1-cant-open-devsr0-no-medium-found/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switching Between Two Resolutions in Linux</title>
		<link>http://alexsleat.co.uk/2011/10/24/switching-between-two-resolutions-in-linux/</link>
		<comments>http://alexsleat.co.uk/2011/10/24/switching-between-two-resolutions-in-linux/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 19:56:06 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Arch Linux]]></category>
		<category><![CDATA[blog1]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[10.10]]></category>
		<category><![CDATA[11.04]]></category>
		<category><![CDATA[11.10]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[isadora]]></category>
		<category><![CDATA[julia]]></category>
		<category><![CDATA[katya]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux mint]]></category>
		<category><![CDATA[lisa]]></category>
		<category><![CDATA[monitor]]></category>
		<category><![CDATA[resolution]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[settings]]></category>
		<category><![CDATA[switch]]></category>
		<category><![CDATA[tv]]></category>
		<category><![CDATA[xorg]]></category>
		<category><![CDATA[xrandr]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=22690</guid>
		<description><![CDATA[<br/><p>I have a TV and my monitor connected to my PC by a VGA switch box but what&#8217;s annoying is they aren&#8217;t the same resolution. This causes problems because I can&#8217;t see what I&#8217;m doing when I have switched to TV and usually have to leave the setting manager open so that when I [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I have a TV and my monitor connected to my PC by a VGA switch box but what&#8217;s annoying is they aren&#8217;t the same resolution. This causes problems because I can&#8217;t see what I&#8217;m doing when I have switched to TV and usually have to leave the setting manager open so that when I change between them I just have to hit return and the resolution changes. That&#8217;s great and all but it&#8217;s far more effort than I want for something I do fairly often.</p>
<p>My plan was initially to create two xorg.conf files and switch between them using a script, I figured this would be the easiest way even though I haven&#8217;t messed around with xorg stuff for a few years ever since things just started working better in Linux. Turns out I couldn&#8217;t even find where they keep the xorg.conf file, it sure isn&#8217;t in /etc/X11 where it was the last time I looked..</p>
<p>On the search for this file though I came across another useful tool called xrandr, which essentially allows you to change the resolution from the command line.</p>
<blockquote>
<p style="text-align: left;">Xrandr is used to set the size, orientation and/or reflection of the outputs for a<br />
screen. It can also set the screen size.</p>
<p style="text-align: left;">If invoked without any option, it will dump the state of the outputs, showing the<br />
existing modes for each of them, with a &#8216;+&#8217; after the preferred mode and a &#8216;*&#8217;<br />
after the current mode.</p>
<p style="text-align: left;">There are a few global options. Other options modify the last output that is spec‐<br />
ified in earlier parameters in the command line. Multiple outputs may be modified<br />
at the same time by passing multiple &#8211;output options followed immediately by<br />
their corresponding modifying options.</p>
</blockquote>
<p style="text-align: right;">For more information on xrandr check out the <a href="http://linux.die.net/man/1/xrandr">manual page</a> (or type <em>man xrandr</em> in terminal).</p>
<p style="text-align: left;">It turns out it&#8217;s an extremely easy tool to use, with a command as simple as the following changing the resolution:</p>
<div class="dean_ch" style="white-space: wrap;">xrandr &#8211;output VGA1 &#8211;mode 1440&#215;900</div>
<p>So the next thing I did was create the following script which allows the resolution to switch between 1440&#215;900 and 1360&#215;768 (my monitor and my TV native resolutions).</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re3">#!/bin/bash</span></p>
<p><span class="re2">TV=</span><span class="st0">&quot;1360 x 768&quot;</span><br />
<span class="re2">MONITOR=</span><span class="st0">&quot;1440 x 900&quot;</span></p>
<p><span class="re2">TEST=</span><span class="st0">&quot;$(xrandr | grep current | sed -e &#8216;s/.*current //;s/, maximum.*//&#8217;)&quot;</span></p>
<p><span class="re3">#echo <span class="re1">$TEST</span></span></p>
<p><span class="kw1">if</span> <span class="br0">&#91;</span> <span class="st0">&quot;$TEST&quot;</span> == <span class="st0">&quot;$MONITOR&quot;</span> <span class="br0">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xrandr &#8211;output VGA1 &#8211;mode 1360&#215;768</p>
<p><span class="kw1">elif</span> <span class="br0">&#91;</span> <span class="st0">&quot;$TEST&quot;</span> == <span class="st0">&quot;$TV&quot;</span> <span class="br0">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xrandr &#8211;output VGA1 &#8211;mode 1440&#215;900</p>
<p><span class="kw1">else</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">exit</span></p>
<p><span class="kw1">fi</span></div>
<p>This script simply checks what the current resolution is being used and then toggles between the two set resolutions.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2011/10/24/switching-between-two-resolutions-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xfce4 Installed on Ubuntu 11.10, Global Menu Remains.</title>
		<link>http://alexsleat.co.uk/2011/10/23/xfce4-installed-on-ubuntu-11-10-global-menu-remains/</link>
		<comments>http://alexsleat.co.uk/2011/10/23/xfce4-installed-on-ubuntu-11-10-global-menu-remains/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 13:39:52 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blog1]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[11.10]]></category>
		<category><![CDATA[appmenu]]></category>
		<category><![CDATA[appmenu-gtk]]></category>
		<category><![CDATA[appmenu-gtk3]]></category>
		<category><![CDATA[appmenu-qt]]></category>
		<category><![CDATA[global menu]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[isadora]]></category>
		<category><![CDATA[julia]]></category>
		<category><![CDATA[katya]]></category>
		<category><![CDATA[linux mint]]></category>
		<category><![CDATA[lisa]]></category>
		<category><![CDATA[panel]]></category>
		<category><![CDATA[remove]]></category>
		<category><![CDATA[uninstall]]></category>
		<category><![CDATA[xfce]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=22585</guid>
		<description><![CDATA[<br/><p></p> <p>After installing Ubuntu 11.10 I headed straight for an install of gnome-shell, I&#8217;ve been using it for a couple of months without any issue and got used to it enough that it wouldn&#8217;t impede on my workflow. That was until this release, when it was officially supported by Canonical and all of a [...]]]></description>
			<content:encoded><![CDATA[<br/><p><a href="http://alexsleat.co.uk/wp-content/uploads/2011/10/Screenshot-at-2011-10-23-143022.png"><img class="aligncenter size-large wp-image-22586" title="Screenshot at 2011-10-23 14:30:22" src="http://alexsleat.co.uk/wp-content/uploads/2011/10/Screenshot-at-2011-10-23-143022-1024x640.png" alt="" width="640" height="400" /></a></p>
<p>After installing Ubuntu 11.10 I headed straight for an install of gnome-shell, I&#8217;ve been using it for a couple of months without any issue and got used to it enough that it wouldn&#8217;t impede on my workflow. That was until this release, when it was officially supported by Canonical and all of a sudden it&#8217;s broken and mostly useless. So off to Xfce I go, it&#8217;s like gnome2 but way more customisable and actually pretty sweet. </p>
<p>However because I installed from a clean Ubuntu install rather than an xubuntu install I noticed that I still have the global menu (or appmenu-*) floating at the top under the default panel. To remove it, since it&#8217;s doing nothing and it looks plain stupid with transparency added to the panel. </p>
<p>It&#8217;s pretty simple to uninstall, just open up a terminal window and use the following command:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">sudo</span> apt-get remove appmenu-gtk3 appmenu-gtk appmenu-qt</div>
<p>Now just re-start X (log out and in again, restart the computer) and when you return, it should be gone.</p>
<p>And if you ever feel the need to want it back, maybe you want to give unity another try then use the following command:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">sudo</span> apt-get <span class="kw2">install</span> appmenu-gtk3 appmenu-gtk appmenu-qt</div>
<p>Source: <a href="http://www.addictivetips.com/ubuntu-linux-tips/how-to-disable-global-menu-in-ubuntu-11-10-tip/">http://www.addictivetips.com/ubuntu-linux-tips/how-to-disable-global-menu-in-ubuntu-11-10-tip/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2011/10/23/xfce4-installed-on-ubuntu-11-10-global-menu-remains/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One Line IP Address Bash Command</title>
		<link>http://alexsleat.co.uk/2011/09/30/one-line-ip-address-bash-command/</link>
		<comments>http://alexsleat.co.uk/2011/09/30/one-line-ip-address-bash-command/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 15:29:26 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blog1]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[eth0]]></category>
		<category><![CDATA[ifconfig]]></category>
		<category><![CDATA[ip address]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[wlan0]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=16839</guid>
		<description><![CDATA[<br/>ifconfig eth0 &#124; sed -n &#8216;/^[A-Za-z0-9]/ {N;/dr:/{;s/.*dr://;s/ .*//;p;}}&#8217; <p>So you want to display just your IP address and not all the other stuff that comes with using the ifconfig command. Then use the above command.</p> <p>It&#8217;s useful if you need your IP address in a script but you don&#8217;t want to set a static [...]]]></description>
			<content:encoded><![CDATA[<br/><div class="dean_ch" style="white-space: wrap;">ifconfig eth0 | <span class="kw2">sed</span> -n <span class="st0">&#8216;/^[A-Za-z0-9]/ {N;/dr:/{;s/.*dr://;s/ .*//;p;}}&#8217;</span></div>
<p>So you want to display just your IP address and not all the other stuff that comes with using the ifconfig command. Then use the above command.</p>
<p>It&#8217;s useful if you need your IP address in a script but you don&#8217;t want to set a static address for your machine, it outputs just the IP address on a single line as shown below:</p>
<p><a href="http://alexsleat.co.uk/wp-content/uploads/2011/09/ipaddress.png"><img src="http://alexsleat.co.uk/wp-content/uploads/2011/09/ipaddress.png" alt="" title="ipaddress" width="907" height="248" class="aligncenter size-full wp-image-21189" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2011/09/30/one-line-ip-address-bash-command/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HowTo: Remove Every Other Line in Text Files &#8211; Linux</title>
		<link>http://alexsleat.co.uk/2011/04/26/howto-remove-every-other-line-in-text-files-linux/</link>
		<comments>http://alexsleat.co.uk/2011/04/26/howto-remove-every-other-line-in-text-files-linux/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 23:38:57 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Arch Linux]]></category>
		<category><![CDATA[blog1]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[arch]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[isadora]]></category>
		<category><![CDATA[julia]]></category>
		<category><![CDATA[katya]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux mint]]></category>
		<category><![CDATA[lisa]]></category>
		<category><![CDATA[remove every n line]]></category>
		<category><![CDATA[remove every other line]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[text file]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=15294</guid>
		<description><![CDATA[<br/><p>Let&#8217;s say you&#8217;ve got a text file, of any size, big or small, and you want to remove every other line of that file, well here are a few commands in Linux that allow you to do this.</p> <p>Example, you want to get from this:</p> 1 2 3 4 5 6 7 8 9 [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Let&#8217;s say you&#8217;ve got a text file, of any size, big or small, and you want to remove every other line of that file, well here are a few commands in Linux that allow you to do this.</p>
<p>Example, you want to get from this:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="nu0">1</span><br />
<span class="nu0">2</span><br />
<span class="nu0">3</span><br />
<span class="nu0">4</span><br />
<span class="nu0">5</span><br />
<span class="nu0">6</span><br />
<span class="nu0">7</span><br />
<span class="nu0">8</span><br />
<span class="nu0">9</span><br />
<span class="nu0">10</span></div>
<p>To this:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="nu0">1</span><br />
<span class="nu0">3</span><br />
<span class="nu0">5</span><br />
<span class="nu0">7</span><br />
<span class="nu0">9</span></div>
<p><strong>The sed way:</strong></p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">sed</span> -n <span class="st0">&quot;p;N;&quot;</span> <span class="kw2">file</span>.txt &gt; newfile.txt</div>
<p><strong>The awk way:</strong></p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">awk</span> <span class="st0">&#8216;NR%2 != 0&#8242;</span> <span class="kw2">file</span>.txt &gt; newfile.txt</div>
<p>Here you can actually specify N lines, replace 2 in the above command and you&#8217;ll be able to take out every N&#8217;th number. As an example, here&#8217;s the above replaced with a 3 on the file:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="nu0">1</span><br />
<span class="nu0">2</span><br />
<span class="nu0">4</span><br />
<span class="nu0">5</span><br />
<span class="nu0">7</span><br />
<span class="nu0">8</span><br />
<span class="nu0">10</span></div>
<p>Easy as pie, right?</p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2011/04/26/howto-remove-every-other-line-in-text-files-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo: Mount USB Persistent casper-rw File in Linux</title>
		<link>http://alexsleat.co.uk/2011/02/06/howto-mount-usb-persistent-casper-rw-file-in-linux/</link>
		<comments>http://alexsleat.co.uk/2011/02/06/howto-mount-usb-persistent-casper-rw-file-in-linux/#comments</comments>
		<pubDate>Sun, 06 Feb 2011 00:26:56 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blog1]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[casper-rw]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[isadora]]></category>
		<category><![CDATA[julia]]></category>
		<category><![CDATA[katya]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux mint]]></category>
		<category><![CDATA[lisa]]></category>
		<category><![CDATA[live cd]]></category>
		<category><![CDATA[live usb]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[persistent]]></category>
		<category><![CDATA[umount]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=12112</guid>
		<description><![CDATA[<br/><p>So, you&#8217;ve created an awesome Live USB Linux stick with a persistence file which let&#8217;s you boot anywhere and carry all your sweet sweet datas around on it too. If you want to see those files in Linux on your desktop or laptop outside the USB you&#8217;re going to have to mount the loop [...]]]></description>
			<content:encoded><![CDATA[<br/><p>So, you&#8217;ve created an awesome Live USB Linux stick with a persistence file which let&#8217;s you boot anywhere and carry all your sweet sweet datas around on it too. If you want to see those files in Linux on your desktop or laptop outside the USB you&#8217;re going to have to mount the loop device (the casper-rw file) somewhere first. The following commands show how to make a folder and mount the loop and then unmount it too.</p>
<p>Just change the <em>/media/USB/</em> for the mounted location of your mounted USB stick which contains the casper-rw file you want to view the contents of and the <em>/home/alex/caspermnt/</em> for the mount point on your system.</p>
<p><strong>Mount:</strong></p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">mkdir</span> ~/caspermnt<br />
<span class="kw2">sudo</span> <span class="kw2">mount</span> -o loop /media/USB/casper-rw /home/alex/caspermnt/</div>
<p><strong>Unmount:</strong></p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">sudo</span> <span class="kw2">umount</span> ~/caspermnt/</div>
<p>This can be useful for recovering data from a borked Live USB stick or for backing up your files on your computer just to be sure.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2011/02/06/howto-mount-usb-persistent-casper-rw-file-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A More Elegant Solution to Ubuntu Wi-Fi Reconnecting Issue</title>
		<link>http://alexsleat.co.uk/2011/01/09/a-more-elegant-solution-to-ubuntu-wi-fi-reconnecting-issue/</link>
		<comments>http://alexsleat.co.uk/2011/01/09/a-more-elegant-solution-to-ubuntu-wi-fi-reconnecting-issue/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 23:25:52 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blog1]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[10.10]]></category>
		<category><![CDATA[9.04]]></category>
		<category><![CDATA[9.10]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[drop wifi]]></category>
		<category><![CDATA[failing to reconnect]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[init.d]]></category>
		<category><![CDATA[karmic]]></category>
		<category><![CDATA[local]]></category>
		<category><![CDATA[lucid]]></category>
		<category><![CDATA[maverick]]></category>
		<category><![CDATA[network-manager]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[rc.local]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[script on login]]></category>
		<category><![CDATA[script on startup]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wifi doesnt reconnect]]></category>
		<category><![CDATA[wifi not connecting]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=11358</guid>
		<description><![CDATA[<br/><p>Previously I was having problems with Ubuntu dropping wifi connections and failing to reconnect, to solve this I wrote a script which would kill the network-manager and then connect using iwconfig commands (here). While this works fine, it felt a little hacky, having to have a script running as sudo constantly in the background [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Previously I was having problems with Ubuntu dropping wifi connections and failing to reconnect, to solve this I wrote a script which would kill the network-manager and then connect using iwconfig commands (<a href="http://alexsleat.co.uk/2010/11/05/ubuntu-disconnecting-from-wifi-and-failing-to-reconnect/">here</a>). While this works fine, it felt a little hacky, having to have a script running as sudo constantly in the background checking for a dropped connection. After a little searching I came across cron (the time based job scheduler ) and /etc/rc.local (a script which is run after all other initialization scripts have ran, allowing for scripts to be ran on startup) so from this I decided to split the old script up into connection and checking scripts which could be ran from init.d/local and cron, respectively.</p>
<p>Firstly my startup script in /etc/init.d/local which sets up and connects to the wireless network, open the file as sudo:</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">sudo</span> gedit /etc/rc.<span class="kw3">local</span></div>
<p>Paste in the following:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re3">#! /bin/sh</span></p>
<p>service network-manager stop &amp;&amp; service networking stop</p>
<p>iwconfig wlan0 essid NETWORKNAME<br />
iwconfig wlan0 key WEPKEY<br />
ifconfig wlan0 up<br />
dhclient3 wlan0</p>
<p><span class="kw2">sleep</span> <span class="nu0">10</span></p>
<p><span class="kw1">if</span> iwconfig wlan0 | <span class="kw2">grep</span> -o <span class="st0">&quot;Access Point: Not-Associated&quot;</span><br />
<span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ifconfig wlan0 down<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">sleep</span> <span class="nu0">10</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ifconfig wlan0 up</p>
<p><span class="kw1">fi</span></p>
<p><span class="kw3">exit</span> <span class="nu0">0</span><br />
&nbsp;</div>
<p>Next the script for checking the network is still connected, if not attempt to reconnect (named wirelesscheck.sh):</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re3">#!/bin/bash</span></p>
<p><span class="kw1">if</span> iwconfig wlan0 | <span class="kw2">grep</span> -o <span class="st0">&quot;Access Point: Not-Associated&quot;</span><br />
<span class="kw1">then</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; ifconfig wlan0 down<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">sleep</span> <span class="nu0">10</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ifconfig wlan0 up<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
<span class="kw1">fi</span></div>
<p>Make sure this script is executable (from the directory of the script):</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">chmod</span> +x wirelesscheck.<span class="kw2">sh</span></div>
<blockquote><p>Note: This is setup in the sudo crontab, only because this command needs root privileges &#8211; other commands could be added to a user crontab (by removing sudo from the following.)</p></blockquote>
<p>Now, edit (-e) the crontab for sudo:</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">sudo</span> crontab -e</div>
<p>If crontab has not previously been used choose an editor (I used nano &#8211; 2) and append this line to the bottom of the file and change the frequency and directory of the script. The current settings will run it every 5 minutes (*/5) every hour, day, month and year and the file is located in &#8220;/path/to/script/wirelesscheck.sh&#8221;.</p>
<div class="dean_ch" style="white-space: wrap;">*/<span class="nu0">5</span> * * * * /path/to/script/wirelesscheck.<span class="kw2">sh</span></div>
<p>If you have any issues, leave a comment and I will help if I can.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2011/01/09/a-more-elegant-solution-to-ubuntu-wi-fi-reconnecting-issue/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How To: Install Pyrobot in Ubuntu</title>
		<link>http://alexsleat.co.uk/2010/11/30/how-to-install-pyrobot-in-ubuntu/</link>
		<comments>http://alexsleat.co.uk/2010/11/30/how-to-install-pyrobot-in-ubuntu/#comments</comments>
		<pubDate>Tue, 30 Nov 2010 14:30:53 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blog1]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[10.10]]></category>
		<category><![CDATA[9.10]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[isadora]]></category>
		<category><![CDATA[julia]]></category>
		<category><![CDATA[karmic]]></category>
		<category><![CDATA[katya]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux mint]]></category>
		<category><![CDATA[lisa]]></category>
		<category><![CDATA[maverick]]></category>
		<category><![CDATA[Maverick Meerkat]]></category>
		<category><![CDATA[pyrobot install]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[sh]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=8122</guid>
		<description><![CDATA[<br/><p>A quick guide for getting pyrobot running in Ubuntu, I&#8217;ve managed to get it running on 32bit and 64bit Ubuntu (10.10) so follow the guide accordingly to whichever architecture you&#8217;re using (64bit is about half way down the post).</p> 32-bit <p>1. Download this file, or copy the below into a file and save it [...]]]></description>
			<content:encoded><![CDATA[<br/><p>A quick guide for getting pyrobot running in Ubuntu, I&#8217;ve managed to get it running on 32bit and 64bit Ubuntu (10.10) so follow the guide accordingly to whichever architecture you&#8217;re using (64bit is about half way down the post).</p>
<h2><span style="text-decoration: underline;">32-bit</span></h2>
<p><strong>1. </strong>Download <a href="http://dl.dropbox.com/u/307455/pyroinstall.sh">this file</a>, or copy the below into a file and save it as <em>pyroinstall.sh </em>to your home dir.</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re3">#!/bin/sh</span></p>
<p><span class="re2">currentdir=</span>$<span class="br0">&#40;</span><span class="kw3">pwd</span><span class="br0">&#41;</span></p>
<p><span class="kw2">sudo</span> apt-get <span class="kw2">install</span> build-essential python2<span class="nu0">.6</span> python2<span class="nu0">.6</span>-dev python-tk python-numeric libjpeg62-dev libncurses5-dev swig</p>
<p><span class="kw2">wget</span> http://pyrorobotics.org/download/pyrobot-latest.tgz</p>
<p><span class="kw2">tar</span> -zxvf pyrobot-latest.tgz</p>
<p><span class="kw3">cd</span> pyrobot</p>
<p>python configure.py</p>
<p><span class="kw2">make</span></p>
<p><span class="kw2">sed</span> -ie <span class="st0">&#8216;s/-e #!/#!/g&#8217;</span> <span class="re1">$currentdir</span>/pyrobot/bin/pyrobot<br />
<span class="kw2">sed</span> -ie <span class="st0">&#8216;s/-e # /# /g&#8217;</span> <span class="re1">$currentdir</span>/pyrobot/system/version.py</p>
<p><span class="kw3">echo</span> <span class="st0">&#8216;export PATH=${PATH}:&#8217;</span><span class="re1">$currentdir</span><span class="st0">&#8216;/pyrobot/bin&#8217;</span> &gt;&gt; <span class="re1">$currentdir</span>/.bashrc</div>
<p><em>Note: The &#8216; in the code highlighter I have above won&#8217;t work in terminal, there isn&#8217;t much I can do about it so you&#8217;ll have to re-write it. Also if you&#8217;re doing this manually change the &#8220;$currentdir&#8221; to &#8220;~&#8221; if you are doing it in your home directory.</em></p>
<p><strong>2.</strong> Make sure this file is in your home directory (e.g /home/alex/pyroinstall.sh) and make it executable:</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">chmod</span> +x pyroinstall.<span class="kw2">sh</span></div>
<p><strong>3.</strong> Run the usual way (as super user because it has to install stuff etc):</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">sudo</span> ./pyroinstall.<span class="kw2">sh</span></div>
<p><strong>4.</strong> It&#8217;ll ask you some questions, below are the answers I used &#8211; you can use other configurations if you know what you need. I also put the full output in pastebin &#8217;cause it was bunging up the guide - <a href="http://pastebin.com/Kc5jyhja">http://pastebin.com/Kc5jyhja</a></p>
<div class="dean_ch" style="white-space: wrap;"><span class="nu0">1</span>. &nbsp; &nbsp; &nbsp;<span class="nu0">2.6</span><br />
<span class="nu0">2</span>. &nbsp; &nbsp; &nbsp;/usr/include/python2<span class="nu0">.6</span><br />
<span class="nu0">3</span>. &nbsp; &nbsp; &nbsp;/usr/bin/python2<span class="nu0">.6</span><br />
<span class="nu0">4</span>. &nbsp; &nbsp; &nbsp;/etc/X11<br />
<span class="nu0">5</span>. &nbsp; &nbsp; &nbsp;none<br />
<span class="nu0">6.01</span>&nbsp; &nbsp; n<br />
<span class="nu0">6.02</span>&nbsp; &nbsp; n<br />
<span class="nu0">6.03</span>&nbsp; &nbsp; n<br />
<span class="nu0">6.04</span>&nbsp; &nbsp; n<br />
<span class="nu0">6.05</span>&nbsp; &nbsp; n<br />
<span class="nu0">6.06</span>&nbsp; &nbsp; n<br />
<span class="nu0">6.07</span>&nbsp; &nbsp; n<br />
<span class="nu0">6.08</span>&nbsp; &nbsp; n<br />
<span class="nu0">6.09</span>&nbsp; &nbsp; n<br />
<span class="nu0">6.10</span>&nbsp; &nbsp; n<br />
<span class="nu0">6.11</span>&nbsp; &nbsp; y<br />
<span class="nu0">6.12</span>&nbsp; &nbsp; y</div>
<p><strong>5.</strong> Once it&#8217;s done reboot or run:</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw3">source</span> ~/.bashrc</div>
<p><strong>6.</strong> Allow read/write/execute permissions for the pyrobot folder:</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">sudo</span> <span class="kw2">chmod</span> -R <span class="nu0">777</span> ~/pyrobot</div>
<p>You should all be done, try typing the following to get it running!</p>
<div class="dean_ch" style="white-space: wrap;"> pyrobot</div>
<h2><span style="text-decoration: underline;">64-bit</span></h2>
<p>In order to get pyrobot running on 64bit, you basically need to add -fPIC to CFLAGS in all the relative Makefiles as explained in this mailing list post &#8211; <a href="http://www.mail-archive.com/pyro-users@pyrorobotics.org/msg00344.html">http://www.mail-archive.com/pyro-users@pyrorobotics.org/msg00344.html</a> - Lucky for you I&#8217;ve already gone through the effort of doing it and compressed it (<a href="http://dl.dropbox.com/u/307455/pyrobot-5.0.0_64bit.tar">download here</a> you won&#8217;t need to if you are going to run the script though, it&#8217;ll do it for you..).</p>
<p>This script should download the file, configure and make and output the path to the .bashrc file for you (similar to the 32bit one does) so download this file, or copy and paste the script below into a file in your home directory:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re3">#!/bin/sh</span></p>
<p><span class="re2">currentdir=</span>$<span class="br0">&#40;</span><span class="kw3">pwd</span><span class="br0">&#41;</span></p>
<p><span class="kw2">sudo</span> apt-get <span class="kw2">install</span> build-essential python2<span class="nu0">.6</span> python2<span class="nu0">.6</span>-dev python-tk python-numeric libjpeg62-dev libncurses5-dev swig</p>
<p><span class="kw2">wget</span> http://dl.dropbox.com/u/<span class="nu0">307455</span>/pyrobot<span class="nu0">-5.0</span>.0_64bit.<span class="kw2">tar</span></p>
<p><span class="kw2">tar</span> -zxvf pyrobot<span class="nu0">-5.0</span>.0_64bit.<span class="kw2">tar</span></p>
<p><span class="kw3">cd</span> pyrobot</p>
<p>python configure.py</p>
<p><span class="kw2">make</span></p>
<p><span class="kw3">echo</span> <span class="st0">&#8216;export PATH=${PATH}:&#8217;</span><span class="re1">$currentdir</span><span class="st0">&#8216;/pyrobot/bin&#8217;</span> &gt;&gt; <span class="re1">$currentdir</span>/.bashrc</div>
<p>2. Make sure this file is in your home directory (e.g /home/alex/pyroinstall64.sh) and make it executable:</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">chmod</span> +x pyroinstall64.<span class="kw2">sh</span></div>
<p>3. Run the usual way (as super user because it has to install stuff etc):</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">sudo</span> ./pyroinstall64.<span class="kw2">sh</span></div>
<p>Steps 4. 5. and 6. are the same as above..</p>
<h2><span style="text-decoration: underline;">Change Default Editor</span></h2>
<p>If you want to change the default editor from emacs to anything else (this will change the default editor used in other terminal applications too..) use the following commands, just change gedit to whatever you&#8217;d like (vi, vim, kedit etc):</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw3">echo</span> <span class="st0">&quot;export EDITOR=/usr/bin/gedit&quot;</span> &gt;&gt; ~/.bashrc<br />
<span class="kw3">source</span> ~/.bashrc</div>
<p>Any problems leave a comment and I&#8217;ll try and help as best as I can..</p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2010/11/30/how-to-install-pyrobot-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>HowTo: Find Recently Used Commands in Linux</title>
		<link>http://alexsleat.co.uk/2010/06/22/howto-find-recently-used-commands-in-linux/</link>
		<comments>http://alexsleat.co.uk/2010/06/22/howto-find-recently-used-commands-in-linux/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 15:17:52 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blog1]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=193</guid>
		<description><![CDATA[<br/><p>One of my most used commands in Linux is the history command, it lists all your recent commands. The problem with this is you might have to scroll through hundreds before you get to one of any interest, so adding grep to search through these and bring back only relative one&#8217;s is great.</p> <p>Give [...]]]></description>
			<content:encoded><![CDATA[<br/><p>One of my most used commands in Linux is the history command, it lists all your recent commands. The problem with this is you might have to scroll through hundreds before you get to one of any interest, so adding grep to search through these and bring back only relative one&#8217;s is great.</p>
<p>Give it a try (just change searchcriteria for what you want like apt-get or tar):</p>
<blockquote><p><code>history | grep searchcriteria</code></p></blockquote>
<p>Manual pages:</p>
<ul>
<li><a href="http://linux.die.net/man/3/history">history</a></li>
<li><a href="http://linux.die.net/man/1/grep">grep</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2010/06/22/howto-find-recently-used-commands-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

