<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:ymaps="http://api.maps.yahoo.com/Maps/V2/AnnotatedMaps.xsd">

<channel>
	<title>austenconstable.com &#187; Linux</title>
	<atom:link href="http://www.austenconstable.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.austenconstable.com</link>
	<description>a year in the merde</description>
	<lastBuildDate>Thu, 15 Oct 2009 16:19:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>HOWTO: Recursively delete matching files on the Linux command line</title>
		<link>http://www.austenconstable.com/2008/10/08/recursively-delete-matching-files-on-the-linux-command-line/</link>
		<comments>http://www.austenconstable.com/2008/10/08/recursively-delete-matching-files-on-the-linux-command-line/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 09:18:11 +0000</pubDate>
		<dc:creator>Austen</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.austenconstable.com/?p=67</guid>
		<description><![CDATA[An easy way to recursively delete files matching a particular pattern is to use this one liner: find &#124; grep &#34;search&#34; &#124; perl -nle unlink UPDATE &#8211; Another handy one liner to recursively delete directories is: rm -rf `find . &#8230; <a href="http://www.austenconstable.com/2008/10/08/recursively-delete-matching-files-on-the-linux-command-line/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>An easy way to recursively delete files matching a particular pattern is to use this one liner:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;search&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-nle</span> <span style="color: #c20cb9; font-weight: bold;">unlink</span></pre></div></div>

<p>UPDATE &#8211; Another handy one liner to recursively delete directories is:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-type</span> d <span style="color: #660033;">-name</span> .svn<span style="color: #000000; font-weight: bold;">`</span></pre></div></div>

<p>Obviously replacing &#8220;.svn&#8221; with whatever your directories are called. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.austenconstable.com/2008/10/08/recursively-delete-matching-files-on-the-linux-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Recursive search and replace on the Linux command line</title>
		<link>http://www.austenconstable.com/2008/09/02/recursive-search-and-replace-on-the-linux-command-line/</link>
		<comments>http://www.austenconstable.com/2008/09/02/recursive-search-and-replace-on-the-linux-command-line/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 15:35:16 +0000</pubDate>
		<dc:creator>Austen</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[sed]]></category>

		<guid isPermaLink="false">http://www.austenconstable.com/?p=58</guid>
		<description><![CDATA[The &#8216;traditional&#8217; way to search and replace on the command line was to use some combination of grep/find/perl/sed etc. Which offers great flexibility but at the end of the day can turn into a right pain in order to complete &#8230; <a href="http://www.austenconstable.com/2008/09/02/recursive-search-and-replace-on-the-linux-command-line/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><span style="text-decoration: line-through;">The &#8216;traditional&#8217; way to search and replace on the command line was to use some combination of grep/find/perl/sed etc. Which offers great flexibility but at the end of the day can turn into a right pain in order to complete a simple task.</span> <em>Turns out only to be a pain in the ass if you don&#8217;t know or can&#8217;t remember the correct syntax! </em><span style="text-decoration: line-through;"><br />
</span></p>
<p>Recently I stumbled across rpl. (<a href="http://freshmeat.net/projects/rpl/" onclick="pageTracker._trackPageview('/outgoing/freshmeat.net/projects/rpl/?referer=');">http://freshmeat.net/projects/rpl/</a>) It&#8217;s a nice little text replacement utility which is as simple as:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rpl <span style="color: #660033;">-R</span> search replace <span style="color: #000000; font-weight: bold;">*</span></pre></div></div>

<p>Although rpl is easy, the other alternatives are hardly difficult. (At least once you know them)</p>
<p>For non-recursive search and replace try: <a href="http://www.liamdelahunty.com/tips/linux_search_and_replace_multiple_files.php" onclick="pageTracker._trackPageview('/outgoing/www.liamdelahunty.com/tips/linux_search_and_replace_multiple_files.php?referer=');">Perl</a> or <a href="http://gabeanderson.com/2008/02/01/unixlinux-find-replace-in-multiple-files/" onclick="pageTracker._trackPageview('/outgoing/gabeanderson.com/2008/02/01/unixlinux-find-replace-in-multiple-files/?referer=');">sed</a>. (At some point I&#8217;m sure I&#8217;ll get around to finding recursive Perl and sed alternatives.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.austenconstable.com/2008/09/02/recursive-search-and-replace-on-the-linux-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Compiling the latest FFmpeg &amp; x264 on CentOS 4</title>
		<link>http://www.austenconstable.com/2008/08/06/howto-compiling-the-latest-ffmpeg-x264-on-centos-4/</link>
		<comments>http://www.austenconstable.com/2008/08/06/howto-compiling-the-latest-ffmpeg-x264-on-centos-4/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 10:13:50 +0000</pubDate>
		<dc:creator>Austen</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[FLV]]></category>
		<category><![CDATA[Nokia N95]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[x264]]></category>

		<guid isPermaLink="false">http://www.austenconstable.com/?p=44</guid>
		<description><![CDATA[Intoduction FFmpeg is a superb video processing tool used to encode and transcode video files. In this particular project I needed to build &#8220;youtube&#8221; style video upload which would transcode into FLV, specifically catering for video files from the Nokia &#8230; <a href="http://www.austenconstable.com/2008/08/06/howto-compiling-the-latest-ffmpeg-x264-on-centos-4/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h3>Intoduction</h3>
<p>FFmpeg is a superb video processing tool used to encode and transcode video files. In this particular project I needed to build &#8220;youtube&#8221; style video upload which would transcode into FLV, specifically catering for video files from the Nokia N95.</p>
<p>I spent quite a long time messing about with the stock version of ffmpeg on CentOS 4/Ubuntu trying to make it work, but it turned out not to be new enough/have all the right support compiled in.</p>
<p>This howto was written because I couldn&#8217;t find anything that fitted the bill for CentOS/RHEL (And being a Ubuntu man, found it a pain to get it compiled and working under CentOS). It&#8217;s based on the excellent tutorial by FakeOutdoorsman over on the <a href="http://ubuntuforums.org/showthread.php?t=786095" target="_blank" onclick="pageTracker._trackPageview('/outgoing/ubuntuforums.org/showthread.php?t=786095&amp;referer=');">Ubuntu forums</a>. So big thanks to them.</p>
<p>These instructions have been tested on a fresh minimal install of CentOS 4.6 running in a VirtualBox VM.</p>
<h3>Preparation</h3>
<ol>
<li>Ensure that you have the rpmforge repo&#8217;s added to yum. See <a href="http://dag.wieers.com/rpm/FAQ.php#B1" target="_blank" onclick="pageTracker._trackPageview('/outgoing/dag.wieers.com/rpm/FAQ.php_B1?referer=');">here</a> for instructions.</li>
<li>Update the install

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum update</pre></div></div>

</li>
<li>(If you are <strong>not</strong> installing onto a fresh minimal install) Remove ffmpeg, x264 and faad2 to avoid confusion.

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum remove <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> x264 faad2 faad2-devel</pre></div></div>

</li>
<li>Install the necessary build tools

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">gcc</span> gcc-c++ <span style="color: #c20cb9; font-weight: bold;">automake</span> <span style="color: #c20cb9; font-weight: bold;">autoconf</span> libtool yasm git subversion</pre></div></div>

</li>
<li>Install the necessary libraries

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> zlib-devel libmad-devel libvorbis-devel libtheora-devel lame-devel faac-devel a52dec-devel xvidcore-devel freetype-devel</pre></div></div>

</li>
</ol>
<h3>Compile supporting libraries</h3>
<ol>
<li>Compile &amp; Install <a href="http://www.audiocoding.com/faad2.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.audiocoding.com/faad2.html?referer=');">faad2</a> (for some reason I couldn&#8217;t get it to compile against the standard rpm version)

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>downloads.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>faac<span style="color: #000000; font-weight: bold;">/</span>faad2-2.6.1.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> xzvf faad2-2.6.1.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> faad2
autoreconf <span style="color: #660033;">-vif</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

</li>
<li>Compile &amp; Install <a href="http://gpac.sourceforge.net/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/gpac.sourceforge.net/?referer=');">GPAC</a>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>downloads.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>gpac<span style="color: #000000; font-weight: bold;">/</span>gpac-0.4.4.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzvf</span> gpac-0.4.4.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> gpac
.<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> install-lib</pre></div></div>

<p>Note: if the compile fails with a osmozilla related error, please see <a href="http://sourceforge.net/forum/forum.php?thread_id=1950227&amp;forum_id=287546" target="_blank" onclick="pageTracker._trackPageview('/outgoing/sourceforge.net/forum/forum.php?thread_id=1950227_amp_forum_id=287546&amp;referer=');">here</a>. I had to remove mozilla support to get it to compile.</li>
<li>Update the links to the shared libs

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'/usr/local/lib/'</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ld.so.conf.d<span style="color: #000000; font-weight: bold;">/</span>gapc-1386.conf
ldconfig</pre></div></div>

</li>
<li>Compile &amp; Install <a href="http://www.videolan.org/developers/x264.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.videolan.org/developers/x264.html?referer=');">x264</a>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~
git clone git:<span style="color: #000000; font-weight: bold;">//</span>git.videolan.org<span style="color: #000000; font-weight: bold;">/</span>x264.git
<span style="color: #7a0874; font-weight: bold;">cd</span> x264
.<span style="color: #000000; font-weight: bold;">/</span>configure  <span style="color: #660033;">--enable-pthread</span> <span style="color: #660033;">--enable-mp4-output</span> <span style="color: #660033;">--enable-shared</span>
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

</li>
<li>Update the links to the shared libs&#8230;again

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ldconfig</pre></div></div>

</li>
</ol>
<h3>Install ffmpeg</h3>
<ol>
<li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~
<span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #c20cb9; font-weight: bold;">svn</span>:<span style="color: #000000; font-weight: bold;">//</span>svn.mplayerhq.hu<span style="color: #000000; font-weight: bold;">/</span>ffmpeg<span style="color: #000000; font-weight: bold;">/</span>trunk <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span> <span style="color: #660033;">--disable-debug</span> <span style="color: #660033;">--enable-shared</span> <span style="color: #660033;">--enable-gpl</span> <span style="color: #660033;">--enable-nonfree</span> <span style="color: #660033;">--enable-postproc</span> <span style="color: #660033;">--enable-swscale</span> <span style="color: #660033;">--enable-pthreads</span> <span style="color: #660033;">--enable-x11grab</span> <span style="color: #660033;">--enable-liba52</span> <span style="color: #660033;">--enable-libx264</span> <span style="color: #660033;">--enable-libxvid</span> <span style="color: #660033;">--enable-libvorbis</span> <span style="color: #660033;">--enable-libfaac</span> <span style="color: #660033;">--enable-libfaad</span> <span style="color: #660033;">--enable-libmp3lame</span>
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

</li>
<li>If ffmpeg has problems finding shared libraries, set the LD_LIBRARY_PATH

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib; export LD_LIBRARY_PATH'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ld.so.conf
ldconfig</pre></div></div>

<p>I&#8217;m not convinced that this is the <a href="http://xahlee.org/UnixResource_dir/_/ldpath.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/xahlee.org/UnixResource_dir/_/ldpath.html?referer=');">correct thing</a> to do, or the correct way to do it&#8230;but it seems to work&#8230;</li>
<li>All done.</li>
</ol>
<h4>Additional resources:</h4>
<p><a href="http://www.nazly.net/index.php?page=showevents&amp;selTopic=230" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.nazly.net/index.php?page=showevents_amp_selTopic=230&amp;referer=');">http://www.nazly.net/index.php?page=showevents&amp;selTopic=230</a></p>
<p><a href="http://www.tuxmachines.org/node/17063" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.tuxmachines.org/node/17063?referer=');">http://www.tuxmachines.org/node/17063</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.austenconstable.com/2008/08/06/howto-compiling-the-latest-ffmpeg-x264-on-centos-4/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

