<?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>Wojciech Jamrozy blog &#187; Linux</title>
	<atom:link href="http://www.wojtekrj.net/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wojtekrj.net</link>
	<description>Blog about computer science, programming and linux</description>
	<lastBuildDate>Sun, 23 Oct 2011 21:57:23 +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>[Ubuntu] Ubuntu 10.04 upgrade Nautilus, gnome-volume-control and Thunderbird issues</title>
		<link>http://www.wojtekrj.net/2010/05/ubuntu-ubuntu-10-04-upgrade-nautilus-gnome-volume-control-and-thunderbird-issues/</link>
		<comments>http://www.wojtekrj.net/2010/05/ubuntu-ubuntu-10-04-upgrade-nautilus-gnome-volume-control-and-thunderbird-issues/#comments</comments>
		<pubDate>Sat, 01 May 2010 18:39:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[lucid lynx]]></category>
		<category><![CDATA[ubuntu 10.04]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.wojtekrj.net/?p=478</guid>
		<description><![CDATA[1. If you like having close, maximize and minimize buttons on the right in Nautlius, type : gconftool-2 -s /apps/metacity/general/button_layout -t string &#34;menu:minimize,maximize,close&#34; in your console. 2. If your new Mozilla Thunderbird 3.0 doesn&#8217;t read your old e-mails, please change name of .mozilla-thunderbird in your home directory to .thunderbird. 3. If you don&#8217;t see your [...]]]></description>
			<content:encoded><![CDATA[<p>1. If you like having close, maximize and minimize buttons on the right in Nautlius, type :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gconftool-<span style="color: #000000;">2</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>metacity<span style="color: #000000; font-weight: bold;">/</span>general<span style="color: #000000; font-weight: bold;">/</span>button_layout <span style="color: #660033;">-t</span> string  <span style="color: #ff0000;">&quot;menu:minimize,maximize,close&quot;</span></pre></div></div>

<p>in your console.</p>
<p>2. If your new Mozilla Thunderbird 3.0 doesn&#8217;t read your old e-mails, please change name of <em>.mozilla-thunderbird </em>in your home directory to <em>.thunderbird</em>.</p>
<p>3. If you don&#8217;t see your gnome-volume-control-applet, please add Notification applet to your gnome panel.</p>
<p><a class="a2a_button_wykop" href="http://www.addtoany.com/add_to/wykop?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2010%2F05%2Fubuntu-ubuntu-10-04-upgrade-nautilus-gnome-volume-control-and-thunderbird-issues%2F&amp;linkname=%5BUbuntu%5D%20Ubuntu%2010.04%20upgrade%20Nautilus%2C%20gnome-volume-control%20and%20Thunderbird%20issues" title="Wykop" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/wykop.png" width="16" height="16" alt="Wykop"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2010%2F05%2Fubuntu-ubuntu-10-04-upgrade-nautilus-gnome-volume-control-and-thunderbird-issues%2F&amp;linkname=%5BUbuntu%5D%20Ubuntu%2010.04%20upgrade%20Nautilus%2C%20gnome-volume-control%20and%20Thunderbird%20issues" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2010%2F05%2Fubuntu-ubuntu-10-04-upgrade-nautilus-gnome-volume-control-and-thunderbird-issues%2F&amp;linkname=%5BUbuntu%5D%20Ubuntu%2010.04%20upgrade%20Nautilus%2C%20gnome-volume-control%20and%20Thunderbird%20issues" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2010%2F05%2Fubuntu-ubuntu-10-04-upgrade-nautilus-gnome-volume-control-and-thunderbird-issues%2F&amp;linkname=%5BUbuntu%5D%20Ubuntu%2010.04%20upgrade%20Nautilus%2C%20gnome-volume-control%20and%20Thunderbird%20issues" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2010%2F05%2Fubuntu-ubuntu-10-04-upgrade-nautilus-gnome-volume-control-and-thunderbird-issues%2F&amp;linkname=%5BUbuntu%5D%20Ubuntu%2010.04%20upgrade%20Nautilus%2C%20gnome-volume-control%20and%20Thunderbird%20issues" title="Digg" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_google_bookmarks" href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2010%2F05%2Fubuntu-ubuntu-10-04-upgrade-nautilus-gnome-volume-control-and-thunderbird-issues%2F&amp;linkname=%5BUbuntu%5D%20Ubuntu%2010.04%20upgrade%20Nautilus%2C%20gnome-volume-control%20and%20Thunderbird%20issues" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a><a class="a2a_button_msdn" href="http://www.addtoany.com/add_to/msdn?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2010%2F05%2Fubuntu-ubuntu-10-04-upgrade-nautilus-gnome-volume-control-and-thunderbird-issues%2F&amp;linkname=%5BUbuntu%5D%20Ubuntu%2010.04%20upgrade%20Nautilus%2C%20gnome-volume-control%20and%20Thunderbird%20issues" title="MSDN" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/msdn.png" width="16" height="16" alt="MSDN"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2010%2F05%2Fubuntu-ubuntu-10-04-upgrade-nautilus-gnome-volume-control-and-thunderbird-issues%2F&amp;linkname=%5BUbuntu%5D%20Ubuntu%2010.04%20upgrade%20Nautilus%2C%20gnome-volume-control%20and%20Thunderbird%20issues" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_technotizie" href="http://www.addtoany.com/add_to/technotizie?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2010%2F05%2Fubuntu-ubuntu-10-04-upgrade-nautilus-gnome-volume-control-and-thunderbird-issues%2F&amp;linkname=%5BUbuntu%5D%20Ubuntu%2010.04%20upgrade%20Nautilus%2C%20gnome-volume-control%20and%20Thunderbird%20issues" title="Technotizie" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technotizie.png" width="16" height="16" alt="Technotizie"/></a><a class="a2a_button_technet" href="http://www.addtoany.com/add_to/technet?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2010%2F05%2Fubuntu-ubuntu-10-04-upgrade-nautilus-gnome-volume-control-and-thunderbird-issues%2F&amp;linkname=%5BUbuntu%5D%20Ubuntu%2010.04%20upgrade%20Nautilus%2C%20gnome-volume-control%20and%20Thunderbird%20issues" title="TechNet" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technet.png" width="16" height="16" alt="TechNet"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.wojtekrj.net%2F2010%2F05%2Fubuntu-ubuntu-10-04-upgrade-nautilus-gnome-volume-control-and-thunderbird-issues%2F&amp;title=%5BUbuntu%5D%20Ubuntu%2010.04%20upgrade%20Nautilus%2C%20gnome-volume-control%20and%20Thunderbird%20issues" id="wpa2a_2">Share/Save</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wojtekrj.net/2010/05/ubuntu-ubuntu-10-04-upgrade-nautilus-gnome-volume-control-and-thunderbird-issues/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[Linux] Stallman kontra de Icaza</title>
		<link>http://www.wojtekrj.net/2009/09/linux-stallman-kontra-de-icaza/</link>
		<comments>http://www.wojtekrj.net/2009/09/linux-stallman-kontra-de-icaza/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 10:03:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.wojtekrj.net/?p=328</guid>
		<description><![CDATA[Richard Stallman zaatakował Miguela de Icazę twierdząc, że jest zdrajcą środowiska wolnego oprogramowania: http://www.osnews.com/story/22225/RMS_De_Icaza_Traitor_to_Free_Software_Community De Icaza odpowiedział na to: http://tirania.org/blog/archive/2009/Sep-23.html I want to say that God loves all creatures. From the formidable elephant to the tiniest ant. And that includes Richard Stallman. As for me, I think that there is a world of possibility, and [...]]]></description>
			<content:encoded><![CDATA[<p>Richard Stallman zaatakował Miguela de Icazę twierdząc, że jest zdrajcą środowiska wolnego oprogramowania:<br />
<a target="_blank" href="http://www.osnews.com/story/22225/RMS_De_Icaza_Traitor_to_Free_Software_Community">http://www.osnews.com/story/22225/RMS_De_Icaza_Traitor_to_Free_Software_Community</a><br />
De Icaza odpowiedział na to:<br />
<a target="_blank"  href="http://tirania.org/blog/archive/2009/Sep-23.html">http://tirania.org/blog/archive/2009/Sep-23.html</a><br />
<em>I want to say that God loves all creatures. From the formidable elephant to the tiniest ant. And that includes Richard Stallman.<br />
As for me, I think that there is a world of possibility, and if Richard wants to discuss how we can improve the pool of open source/free software in the world he has my email address.<br />
Love, Miguel. </em><br />
 <img src='http://www.wojtekrj.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  <img src='http://www.wojtekrj.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  <img src='http://www.wojtekrj.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> <span id="more-328"></span></p>
<p>Śmiało mogę powiedzieć, że C# jest jednym z moich ulubionych języków (swoją drogą C# został zaprojektowany przez twórcę Turbo Pascala i Delphi). Nie interesuje mnie to, kto ten język stworzył, ważne, że zawiera wiele rzeczy których brak razi w Javie.<br />
Dzięki Miguelowi mogę cieszyć się pisaniem w ulubionym języku pod ulubionym systemem.<br />
Wiem, że wielu moich kolegów też tak uważa.</p>
<p>Ostatnio rozmawiałem z koleżanką na temat Linuksa i wymieniałem wady i zalety tego systemu. Po podaniu przeze mnie obiektywnej oceny wykazała zainteresowanie przejściem na Linuksa. Jednocześnie powiedziała mi, że kilka lat temu chodziła do klasy z gościem, który wszystkich <strong>agresywnie</strong> atakował za użytkowanie produktów MS (zamiast spokojnie porównywać wady i zalety obu grup produktów), co wszystkich zraziło do środowiska wolnego/otwartego oprogramowania.</p>
<p>Środowisko FLOSS, aby się rozwijać, nie może się pogrążać w ortodoksji. Musi być otwarte na współpracę ze wszystkimi, a zwłaszcza z wielkim biznesem. </p>
<p>Myślę, że Stallmana najlepiej podsumuje poniższe wideo:<br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/S76pHIYx3ik&#038;hl=pl&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/S76pHIYx3ik&#038;hl=pl&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>Jak dla mnie, w pojedynku Stallman kontra de Icaza jest 0:1.</p>
<p><a class="a2a_button_wykop" href="http://www.addtoany.com/add_to/wykop?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-stallman-kontra-de-icaza%2F&amp;linkname=%5BLinux%5D%20Stallman%20kontra%20de%20Icaza" title="Wykop" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/wykop.png" width="16" height="16" alt="Wykop"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-stallman-kontra-de-icaza%2F&amp;linkname=%5BLinux%5D%20Stallman%20kontra%20de%20Icaza" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-stallman-kontra-de-icaza%2F&amp;linkname=%5BLinux%5D%20Stallman%20kontra%20de%20Icaza" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-stallman-kontra-de-icaza%2F&amp;linkname=%5BLinux%5D%20Stallman%20kontra%20de%20Icaza" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-stallman-kontra-de-icaza%2F&amp;linkname=%5BLinux%5D%20Stallman%20kontra%20de%20Icaza" title="Digg" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_google_bookmarks" href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-stallman-kontra-de-icaza%2F&amp;linkname=%5BLinux%5D%20Stallman%20kontra%20de%20Icaza" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a><a class="a2a_button_msdn" href="http://www.addtoany.com/add_to/msdn?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-stallman-kontra-de-icaza%2F&amp;linkname=%5BLinux%5D%20Stallman%20kontra%20de%20Icaza" title="MSDN" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/msdn.png" width="16" height="16" alt="MSDN"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-stallman-kontra-de-icaza%2F&amp;linkname=%5BLinux%5D%20Stallman%20kontra%20de%20Icaza" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_technotizie" href="http://www.addtoany.com/add_to/technotizie?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-stallman-kontra-de-icaza%2F&amp;linkname=%5BLinux%5D%20Stallman%20kontra%20de%20Icaza" title="Technotizie" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technotizie.png" width="16" height="16" alt="Technotizie"/></a><a class="a2a_button_technet" href="http://www.addtoany.com/add_to/technet?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-stallman-kontra-de-icaza%2F&amp;linkname=%5BLinux%5D%20Stallman%20kontra%20de%20Icaza" title="TechNet" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technet.png" width="16" height="16" alt="TechNet"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-stallman-kontra-de-icaza%2F&amp;title=%5BLinux%5D%20Stallman%20kontra%20de%20Icaza" id="wpa2a_4">Share/Save</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wojtekrj.net/2009/09/linux-stallman-kontra-de-icaza/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Ubuntu, Freebsd] How to mount Freebsd 7.2 partition under Ubuntu 9.04</title>
		<link>http://www.wojtekrj.net/2009/09/ubuntu-freebsd-how-to-mount-freebsd-7-2-partition-under-ubuntu-9-04/</link>
		<comments>http://www.wojtekrj.net/2009/09/ubuntu-freebsd-how-to-mount-freebsd-7-2-partition-under-ubuntu-9-04/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 11:45:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Freebsd]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[mounting]]></category>
		<category><![CDATA[partition]]></category>
		<category><![CDATA[ufs]]></category>

		<guid isPermaLink="false">http://www.wojtekrj.net/?p=322</guid>
		<description><![CDATA[1. Be sure you have following options checked in your Ubuntu kernel: File systems -&#62; Miscellaneous filesystems -&#62; UFS file system support (read only) (UFS_FS) File systems -&#62; Partition Types -&#62; PC BIOS (MSDOS partition tables) support (MSDOS_PARTITION) -&#62; BSD disklabel (FreeBSD partition tables) support (BSD_DISKLABEL) Default kernel for Ubuntu has already this options. 2. [...]]]></description>
			<content:encoded><![CDATA[<p>1. Be sure you have following options checked in your Ubuntu kernel:<br />
File systems -&gt; Miscellaneous filesystems -&gt; UFS file system support (read only) (UFS_FS)<br />
File systems -&gt; Partition Types -&gt; PC BIOS (MSDOS partition tables) support (MSDOS_PARTITION) -&gt; BSD disklabel (FreeBSD partition tables) support (BSD_DISKLABEL)<br />
Default kernel for Ubuntu has already this options.</p>
<p>2. After rebooting type in console:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">dmesg</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> bsd</pre></div></div>

<p>You shoud receive similar output:</p>
<pre>[ 2.108529] sda4: &lt;bsd: sda8 sda9&gt;</pre>
<p>It means that you have Freebsd installed on sda4 partition, and sda8 and sda9 are so-called &#8220;slices&#8221;</p>
<p>3. Use command similar to:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-t</span> ufs <span style="color: #660033;">-r</span> <span style="color: #660033;">-o</span> <span style="color: #007800;">ufstype</span>=ufs2 <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda8 <span style="color: #000000; font-weight: bold;">/</span>media<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">free</span></pre></div></div>

<p>For older versions of Freebsd:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-t</span> ufs <span style="color: #660033;">-r</span> <span style="color: #660033;">-o</span> <span style="color: #007800;">ufstype</span>=44bsd <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda8 <span style="color: #000000; font-weight: bold;">/</span>media<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">free</span></pre></div></div>

<p>or</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-t</span> ufs <span style="color: #660033;">-r</span> <span style="color: #660033;">-o</span> <span style="color: #007800;">ufstype</span>=ufs <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda8 <span style="color: #000000; font-weight: bold;">/</span>media<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">free</span></pre></div></div>

<p>might be more suitable.</p>
<p><a class="a2a_button_wykop" href="http://www.addtoany.com/add_to/wykop?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fubuntu-freebsd-how-to-mount-freebsd-7-2-partition-under-ubuntu-9-04%2F&amp;linkname=%5BUbuntu%2C%20Freebsd%5D%20How%20to%20mount%20Freebsd%207.2%20partition%20under%20Ubuntu%209.04" title="Wykop" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/wykop.png" width="16" height="16" alt="Wykop"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fubuntu-freebsd-how-to-mount-freebsd-7-2-partition-under-ubuntu-9-04%2F&amp;linkname=%5BUbuntu%2C%20Freebsd%5D%20How%20to%20mount%20Freebsd%207.2%20partition%20under%20Ubuntu%209.04" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fubuntu-freebsd-how-to-mount-freebsd-7-2-partition-under-ubuntu-9-04%2F&amp;linkname=%5BUbuntu%2C%20Freebsd%5D%20How%20to%20mount%20Freebsd%207.2%20partition%20under%20Ubuntu%209.04" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fubuntu-freebsd-how-to-mount-freebsd-7-2-partition-under-ubuntu-9-04%2F&amp;linkname=%5BUbuntu%2C%20Freebsd%5D%20How%20to%20mount%20Freebsd%207.2%20partition%20under%20Ubuntu%209.04" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fubuntu-freebsd-how-to-mount-freebsd-7-2-partition-under-ubuntu-9-04%2F&amp;linkname=%5BUbuntu%2C%20Freebsd%5D%20How%20to%20mount%20Freebsd%207.2%20partition%20under%20Ubuntu%209.04" title="Digg" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_google_bookmarks" href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fubuntu-freebsd-how-to-mount-freebsd-7-2-partition-under-ubuntu-9-04%2F&amp;linkname=%5BUbuntu%2C%20Freebsd%5D%20How%20to%20mount%20Freebsd%207.2%20partition%20under%20Ubuntu%209.04" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a><a class="a2a_button_msdn" href="http://www.addtoany.com/add_to/msdn?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fubuntu-freebsd-how-to-mount-freebsd-7-2-partition-under-ubuntu-9-04%2F&amp;linkname=%5BUbuntu%2C%20Freebsd%5D%20How%20to%20mount%20Freebsd%207.2%20partition%20under%20Ubuntu%209.04" title="MSDN" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/msdn.png" width="16" height="16" alt="MSDN"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fubuntu-freebsd-how-to-mount-freebsd-7-2-partition-under-ubuntu-9-04%2F&amp;linkname=%5BUbuntu%2C%20Freebsd%5D%20How%20to%20mount%20Freebsd%207.2%20partition%20under%20Ubuntu%209.04" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_technotizie" href="http://www.addtoany.com/add_to/technotizie?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fubuntu-freebsd-how-to-mount-freebsd-7-2-partition-under-ubuntu-9-04%2F&amp;linkname=%5BUbuntu%2C%20Freebsd%5D%20How%20to%20mount%20Freebsd%207.2%20partition%20under%20Ubuntu%209.04" title="Technotizie" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technotizie.png" width="16" height="16" alt="Technotizie"/></a><a class="a2a_button_technet" href="http://www.addtoany.com/add_to/technet?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fubuntu-freebsd-how-to-mount-freebsd-7-2-partition-under-ubuntu-9-04%2F&amp;linkname=%5BUbuntu%2C%20Freebsd%5D%20How%20to%20mount%20Freebsd%207.2%20partition%20under%20Ubuntu%209.04" title="TechNet" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technet.png" width="16" height="16" alt="TechNet"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fubuntu-freebsd-how-to-mount-freebsd-7-2-partition-under-ubuntu-9-04%2F&amp;title=%5BUbuntu%2C%20Freebsd%5D%20How%20to%20mount%20Freebsd%207.2%20partition%20under%20Ubuntu%209.04" id="wpa2a_6">Share/Save</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wojtekrj.net/2009/09/ubuntu-freebsd-how-to-mount-freebsd-7-2-partition-under-ubuntu-9-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Bash,Linux] Very fast disk shredding/data erasure script</title>
		<link>http://www.wojtekrj.net/2009/09/bashlinux-very-fast-disk-shredingdata-erasure-script/</link>
		<comments>http://www.wojtekrj.net/2009/09/bashlinux-very-fast-disk-shredingdata-erasure-script/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 14:28:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[data erasure]]></category>
		<category><![CDATA[disk shreding]]></category>

		<guid isPermaLink="false">http://www.wojtekrj.net/?p=309</guid>
		<description><![CDATA[Before I have setted up my encrypted partitions I had to fill them with random sequention of data. I&#8217;ve noticed that dd if=/dev/urandom of=DEVICE is very slow. It has 3-4 MB/second on my computer. I wanted to make it faster. Here is my solution: 1. Create in tmpfs located in RAM memory large file (about [...]]]></description>
			<content:encoded><![CDATA[<p>Before I have setted up my encrypted partitions I had to fill them with random sequention of data.<br />
I&#8217;ve noticed that dd if=/dev/urandom of=DEVICE is very slow. It has 3-4 MB/second on my computer.<br />
I wanted to make it faster. Here is my solution:<br />
1. Create in tmpfs located in RAM memory large file (about 100 MB) made of pseudo-random sequence (/dev/urandom).<br />
2. Write this file from memory sequentially to the disk.<br />
Speed of this approach is even 34 MB/s &#8211; 10 times faster!!.<br />
Unfortunately, this aproach might not be as secure as dd if=/dev/urandom of=DEVICE<br />
Before you do anything backup your data and be sure what are you doing!!!<br />
My implementation:<span id="more-309"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #666666; font-style: italic;"># Author: Wojtek Jamrozy (www.wojtekrj.net)</span>
<span style="color: #666666; font-style: italic;"># BE SURE WHAT ARE YOU DOING - YOU CAN LOST IMPORTANT DATA</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$#</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;usage: $0 &lt;name of device&gt;&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;You choose $1 device to shred&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Are you sure (it will destroy ALL data on this device)? Type upercase yes:&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">read</span> <span style="color: #c20cb9; font-weight: bold;">yes</span>
<span style="color: #007800;">TMP_DIR</span>=<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>_tmpfs
<span style="color: #007800;">SIZE</span>=<span style="color: #000000;">100</span> <span style="color: #666666; font-style: italic;"># size of pattern in megabytes</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$yes</span>&quot;</span> = <span style="color: #ff0000;">&quot;YES&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Generating random pattern...&quot;</span>
	<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #007800;">$TMP_DIR</span>
	<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-t</span> tmpfs  tmp <span style="color: #007800;">$TMP_DIR</span>
	<span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;">if</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>urandom <span style="color: #007800;">of</span>=<span style="color: #007800;">$TMP_DIR</span><span style="color: #000000; font-weight: bold;">/</span>plik <span style="color: #007800;">bs</span>=<span style="color: #800000;">${SIZE}</span>MB <span style="color: #007800;">count</span>=<span style="color: #000000;">1</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Generating random pattern finished...&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Starting shreding $1&quot;</span>
	<span style="color: #007800;">before</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>s<span style="color: #000000; font-weight: bold;">`</span>
	<span style="color: #007800;">i</span>=<span style="color: #000000;">0</span>
	<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">do</span>	
		<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;">if</span>=<span style="color: #007800;">$TMP_DIR</span><span style="color: #000000; font-weight: bold;">/</span>plik <span style="color: #007800;">of</span>=<span style="color: #007800;">$1</span> <span style="color: #007800;">bs</span>=<span style="color: #800000;">${SIZE}</span>MB <span style="color: #007800;">seek</span>=<span style="color: #007800;">$i</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
		<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$?</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
		<span style="color: #000000; font-weight: bold;">then</span>
			<span style="color: #7a0874; font-weight: bold;">break</span>
		<span style="color: #000000; font-weight: bold;">fi</span>
		<span style="color: #007800;">i</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>i+<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
		<span style="color: #007800;">after</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>s<span style="color: #000000; font-weight: bold;">`</span>
		<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$((i*SIZE)</span>)MB have been copied<span style="color: #000099; font-weight: bold;">\n</span>Average speed: <span style="color: #007800;">$((i*SIZE/(after-before+1)</span>)) MB/s&quot;</span>
	<span style="color: #000000; font-weight: bold;">done</span>
	<span style="color: #007800;">after</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>s<span style="color: #000000; font-weight: bold;">`</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Average speed: <span style="color: #007800;">$(((i+1)</span>*SIZE/(after-before+1))) MB/s&quot;</span>
	<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$TMP_DIR</span><span style="color: #000000; font-weight: bold;">/</span>plik
	<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #007800;">$TMP_DIR</span>
	<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-R</span> <span style="color: #007800;">$TMP_DIR</span>
<span style="color: #000000; font-weight: bold;">else</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;You haven't typed <span style="color: #000099; font-weight: bold;">\&quot;</span>YES<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\n</span>Exiting...&quot;</span>
<span style="color: #000000; font-weight: bold;">fi</span></pre></td></tr></table></div>

<p><a class="a2a_button_wykop" href="http://www.addtoany.com/add_to/wykop?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fbashlinux-very-fast-disk-shredingdata-erasure-script%2F&amp;linkname=%5BBash%2CLinux%5D%20Very%20fast%20disk%20shredding%2Fdata%20erasure%20script" title="Wykop" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/wykop.png" width="16" height="16" alt="Wykop"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fbashlinux-very-fast-disk-shredingdata-erasure-script%2F&amp;linkname=%5BBash%2CLinux%5D%20Very%20fast%20disk%20shredding%2Fdata%20erasure%20script" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fbashlinux-very-fast-disk-shredingdata-erasure-script%2F&amp;linkname=%5BBash%2CLinux%5D%20Very%20fast%20disk%20shredding%2Fdata%20erasure%20script" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fbashlinux-very-fast-disk-shredingdata-erasure-script%2F&amp;linkname=%5BBash%2CLinux%5D%20Very%20fast%20disk%20shredding%2Fdata%20erasure%20script" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fbashlinux-very-fast-disk-shredingdata-erasure-script%2F&amp;linkname=%5BBash%2CLinux%5D%20Very%20fast%20disk%20shredding%2Fdata%20erasure%20script" title="Digg" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_google_bookmarks" href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fbashlinux-very-fast-disk-shredingdata-erasure-script%2F&amp;linkname=%5BBash%2CLinux%5D%20Very%20fast%20disk%20shredding%2Fdata%20erasure%20script" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a><a class="a2a_button_msdn" href="http://www.addtoany.com/add_to/msdn?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fbashlinux-very-fast-disk-shredingdata-erasure-script%2F&amp;linkname=%5BBash%2CLinux%5D%20Very%20fast%20disk%20shredding%2Fdata%20erasure%20script" title="MSDN" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/msdn.png" width="16" height="16" alt="MSDN"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fbashlinux-very-fast-disk-shredingdata-erasure-script%2F&amp;linkname=%5BBash%2CLinux%5D%20Very%20fast%20disk%20shredding%2Fdata%20erasure%20script" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_technotizie" href="http://www.addtoany.com/add_to/technotizie?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fbashlinux-very-fast-disk-shredingdata-erasure-script%2F&amp;linkname=%5BBash%2CLinux%5D%20Very%20fast%20disk%20shredding%2Fdata%20erasure%20script" title="Technotizie" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technotizie.png" width="16" height="16" alt="Technotizie"/></a><a class="a2a_button_technet" href="http://www.addtoany.com/add_to/technet?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fbashlinux-very-fast-disk-shredingdata-erasure-script%2F&amp;linkname=%5BBash%2CLinux%5D%20Very%20fast%20disk%20shredding%2Fdata%20erasure%20script" title="TechNet" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technet.png" width="16" height="16" alt="TechNet"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Fbashlinux-very-fast-disk-shredingdata-erasure-script%2F&amp;title=%5BBash%2CLinux%5D%20Very%20fast%20disk%20shredding%2Fdata%20erasure%20script" id="wpa2a_8">Share/Save</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wojtekrj.net/2009/09/bashlinux-very-fast-disk-shredingdata-erasure-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Linux] Random password generator</title>
		<link>http://www.wojtekrj.net/2009/09/linux-random-password-generator/</link>
		<comments>http://www.wojtekrj.net/2009/09/linux-random-password-generator/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 16:42:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[password generator]]></category>

		<guid isPermaLink="false">http://www.wojtekrj.net/?p=290</guid>
		<description><![CDATA[Here is a script for generating random alphanumeric passwords: #!/bin/bash # passwords.sh if &#91; $# != 2 &#93;; then echo &#34;usage: $0 &#60;length of passwords&#62; &#60;number of passwords&#62; &#34; exit 1 fi tr -cd '[:graph:]' &#60; /dev/urandom &#124; fold -w $1 &#124; head -$2]]></description>
			<content:encoded><![CDATA[<p>Here is a script for generating random alphanumeric passwords:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash </span>
<span style="color: #666666; font-style: italic;"># passwords.sh  </span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$#</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #000000;">2</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;usage: $0 &lt;length of passwords&gt; &lt;number of passwords&gt; &quot;</span>
	<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #c20cb9; font-weight: bold;">tr</span> <span style="color: #660033;">-cd</span> <span style="color: #ff0000;">'[:graph:]'</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>urandom <span style="color: #000000; font-weight: bold;">|</span> fold <span style="color: #660033;">-w</span> <span style="color: #007800;">$1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">head</span> -<span style="color: #007800;">$2</span></pre></div></div>

<p><a class="a2a_button_wykop" href="http://www.addtoany.com/add_to/wykop?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-random-password-generator%2F&amp;linkname=%5BLinux%5D%20Random%20password%20generator" title="Wykop" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/wykop.png" width="16" height="16" alt="Wykop"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-random-password-generator%2F&amp;linkname=%5BLinux%5D%20Random%20password%20generator" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-random-password-generator%2F&amp;linkname=%5BLinux%5D%20Random%20password%20generator" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-random-password-generator%2F&amp;linkname=%5BLinux%5D%20Random%20password%20generator" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-random-password-generator%2F&amp;linkname=%5BLinux%5D%20Random%20password%20generator" title="Digg" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_google_bookmarks" href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-random-password-generator%2F&amp;linkname=%5BLinux%5D%20Random%20password%20generator" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a><a class="a2a_button_msdn" href="http://www.addtoany.com/add_to/msdn?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-random-password-generator%2F&amp;linkname=%5BLinux%5D%20Random%20password%20generator" title="MSDN" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/msdn.png" width="16" height="16" alt="MSDN"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-random-password-generator%2F&amp;linkname=%5BLinux%5D%20Random%20password%20generator" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_technotizie" href="http://www.addtoany.com/add_to/technotizie?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-random-password-generator%2F&amp;linkname=%5BLinux%5D%20Random%20password%20generator" title="Technotizie" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technotizie.png" width="16" height="16" alt="Technotizie"/></a><a class="a2a_button_technet" href="http://www.addtoany.com/add_to/technet?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-random-password-generator%2F&amp;linkname=%5BLinux%5D%20Random%20password%20generator" title="TechNet" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technet.png" width="16" height="16" alt="TechNet"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F09%2Flinux-random-password-generator%2F&amp;title=%5BLinux%5D%20Random%20password%20generator" id="wpa2a_10">Share/Save</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wojtekrj.net/2009/09/linux-random-password-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Ubuntu] Nice Amarok-like music Player</title>
		<link>http://www.wojtekrj.net/2009/07/ubuntu-nice-amarok-like-music-player/</link>
		<comments>http://www.wojtekrj.net/2009/07/ubuntu-nice-amarok-like-music-player/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 20:26:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[exaile]]></category>

		<guid isPermaLink="false">http://www.wojtekrj.net/?p=194</guid>
		<description><![CDATA[I&#8217;ve used Amarok for a long time. Unfortunately, interface of Amarok 2 has  been remarkably changed.  I like &#8220;old&#8221; Amarok&#8217;s interface so I&#8217;ve found Exaile &#8211; Amarok like music player for Gnome written in Python. Here is a screenshot: You can find more in: www.exaile.org]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve used Amarok for a long time. Unfortunately, interface of Amarok 2 has  been <span id="dict102_hidden" style="display: block;"><span>remarkably changed.  I like &#8220;old&#8221; Amarok&#8217;s interface so I&#8217;ve found Exaile &#8211; Amarok like music player for Gnome written in Python. <span id="more-194"></span>Here is a screenshot:</span></span></p>
<p><span style="display: block;"><span></p>
<div id="attachment_199" class="wp-caption alignnone" style="width: 310px"><img class="size-medium wp-image-199" title="exaile_large" src="http://www.wojtekrj.net/wp-content/uploads/2009/07/exaile_large-300x212.jpg" alt="Exaile screenshot" width="300" height="212" /><p class="wp-caption-text">Exaile screenshot</p></div>
<p></span></span></p>
<p><span style="display: block;"><span> </span></span></p>
<p>You can find more in: <a title="www.exaile.org" href="http://www.exaile.org" target="_blank">www.exaile.org</a></p>
<p><a class="a2a_button_wykop" href="http://www.addtoany.com/add_to/wykop?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F07%2Fubuntu-nice-amarok-like-music-player%2F&amp;linkname=%5BUbuntu%5D%20Nice%20Amarok-like%20music%20Player" title="Wykop" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/wykop.png" width="16" height="16" alt="Wykop"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F07%2Fubuntu-nice-amarok-like-music-player%2F&amp;linkname=%5BUbuntu%5D%20Nice%20Amarok-like%20music%20Player" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F07%2Fubuntu-nice-amarok-like-music-player%2F&amp;linkname=%5BUbuntu%5D%20Nice%20Amarok-like%20music%20Player" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F07%2Fubuntu-nice-amarok-like-music-player%2F&amp;linkname=%5BUbuntu%5D%20Nice%20Amarok-like%20music%20Player" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F07%2Fubuntu-nice-amarok-like-music-player%2F&amp;linkname=%5BUbuntu%5D%20Nice%20Amarok-like%20music%20Player" title="Digg" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_google_bookmarks" href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F07%2Fubuntu-nice-amarok-like-music-player%2F&amp;linkname=%5BUbuntu%5D%20Nice%20Amarok-like%20music%20Player" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a><a class="a2a_button_msdn" href="http://www.addtoany.com/add_to/msdn?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F07%2Fubuntu-nice-amarok-like-music-player%2F&amp;linkname=%5BUbuntu%5D%20Nice%20Amarok-like%20music%20Player" title="MSDN" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/msdn.png" width="16" height="16" alt="MSDN"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F07%2Fubuntu-nice-amarok-like-music-player%2F&amp;linkname=%5BUbuntu%5D%20Nice%20Amarok-like%20music%20Player" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_technotizie" href="http://www.addtoany.com/add_to/technotizie?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F07%2Fubuntu-nice-amarok-like-music-player%2F&amp;linkname=%5BUbuntu%5D%20Nice%20Amarok-like%20music%20Player" title="Technotizie" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technotizie.png" width="16" height="16" alt="Technotizie"/></a><a class="a2a_button_technet" href="http://www.addtoany.com/add_to/technet?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F07%2Fubuntu-nice-amarok-like-music-player%2F&amp;linkname=%5BUbuntu%5D%20Nice%20Amarok-like%20music%20Player" title="TechNet" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technet.png" width="16" height="16" alt="TechNet"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F07%2Fubuntu-nice-amarok-like-music-player%2F&amp;title=%5BUbuntu%5D%20Nice%20Amarok-like%20music%20Player" id="wpa2a_12">Share/Save</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wojtekrj.net/2009/07/ubuntu-nice-amarok-like-music-player/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Linux] How to execute SQL query on Firefox history</title>
		<link>http://www.wojtekrj.net/2009/04/linux-how/</link>
		<comments>http://www.wojtekrj.net/2009/04/linux-how/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 17:37:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://www.wojtekrj.net/?p=176</guid>
		<description><![CDATA[1. If you don&#8217;t know anything about SQLite, please read: http://en.wikipedia.org/wiki/SQLite 2. Install sqlitebrowser: sudo apt-get install sqlitebrowser 3. Run sqlitebrowser 4. Open file: /home/your username/.mozilla/firefox/your profile/places.sqlite It&#8217;s a SQLite database where firefox stores information about history. 5. Execute following command: SELECT url FROM moz_places WHERE url LIKE &#34;%wojtekrj.net%&#34; 6. You should have list of [...]]]></description>
			<content:encoded><![CDATA[<p>1. If you don&#8217;t know anything about SQLite, please read:</p>
<p>http://en.wikipedia.org/wiki/SQLite</p>
<p>2. Install sqlitebrowser:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> sqlitebrowser</pre></div></div>

<p>3. Run sqlitebrowser<br />
4. Open file:<br />
/home/your username/.mozilla/firefox/your profile/places.sqlite<br />
It&#8217;s a SQLite database where firefox stores information about history.<br />
5. Execute following command:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> url <span style="color: #993333; font-weight: bold;">FROM</span> moz_places <span style="color: #993333; font-weight: bold;">WHERE</span> url <span style="color: #993333; font-weight: bold;">LIKE</span> <span style="color: #ff0000;">&quot;%wojtekrj.net%&quot;</span></pre></div></div>

<p>6. You should have list of all vistied by you pages from my blog.</p>
<p><a class="a2a_button_wykop" href="http://www.addtoany.com/add_to/wykop?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how%2F&amp;linkname=%5BLinux%5D%20How%20to%20execute%20SQL%20query%20on%20Firefox%20history" title="Wykop" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/wykop.png" width="16" height="16" alt="Wykop"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how%2F&amp;linkname=%5BLinux%5D%20How%20to%20execute%20SQL%20query%20on%20Firefox%20history" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how%2F&amp;linkname=%5BLinux%5D%20How%20to%20execute%20SQL%20query%20on%20Firefox%20history" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how%2F&amp;linkname=%5BLinux%5D%20How%20to%20execute%20SQL%20query%20on%20Firefox%20history" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how%2F&amp;linkname=%5BLinux%5D%20How%20to%20execute%20SQL%20query%20on%20Firefox%20history" title="Digg" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_google_bookmarks" href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how%2F&amp;linkname=%5BLinux%5D%20How%20to%20execute%20SQL%20query%20on%20Firefox%20history" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a><a class="a2a_button_msdn" href="http://www.addtoany.com/add_to/msdn?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how%2F&amp;linkname=%5BLinux%5D%20How%20to%20execute%20SQL%20query%20on%20Firefox%20history" title="MSDN" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/msdn.png" width="16" height="16" alt="MSDN"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how%2F&amp;linkname=%5BLinux%5D%20How%20to%20execute%20SQL%20query%20on%20Firefox%20history" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_technotizie" href="http://www.addtoany.com/add_to/technotizie?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how%2F&amp;linkname=%5BLinux%5D%20How%20to%20execute%20SQL%20query%20on%20Firefox%20history" title="Technotizie" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technotizie.png" width="16" height="16" alt="Technotizie"/></a><a class="a2a_button_technet" href="http://www.addtoany.com/add_to/technet?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how%2F&amp;linkname=%5BLinux%5D%20How%20to%20execute%20SQL%20query%20on%20Firefox%20history" title="TechNet" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technet.png" width="16" height="16" alt="TechNet"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how%2F&amp;title=%5BLinux%5D%20How%20to%20execute%20SQL%20query%20on%20Firefox%20history" id="wpa2a_14">Share/Save</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wojtekrj.net/2009/04/linux-how/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Linux] How to check if program has memory leaks</title>
		<link>http://www.wojtekrj.net/2009/04/linux-how-to-check-if-program-has-memory-leaks/</link>
		<comments>http://www.wojtekrj.net/2009/04/linux-how-to-check-if-program-has-memory-leaks/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 16:56:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.wojtekrj.net/?p=168</guid>
		<description><![CDATA[You can check your program using command: valgrind your_program Example of usage: We have following C++ program (tst.cpp): int main&#40;&#41; &#123; int * tab = new int&#91;1000000&#93;; return 0; &#125; Obviously it generates memory leak. We compile it to tst file and execute: valgrind tst ==20777== Memcheck, a memory error detector. ==20777== Copyright (C) 2002-2008, [...]]]></description>
			<content:encoded><![CDATA[<p>You can check your program using command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">valgrind</span> your_program</pre></div></div>

<p>Example of usage:<br />
We have following C++ program (tst.cpp):</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #0000ff;">int</span> main<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span>
	<span style="color: #0000ff;">int</span> <span style="color: #000040;">*</span> tab <span style="color: #000080;">=</span> <span style="color: #0000dd;">new</span> <span style="color: #0000ff;">int</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1000000</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	<span style="color: #0000ff;">return</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span></pre></div></div>

<p>Obviously it generates memory leak. We compile it to <em>tst</em> file and execute:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">valgrind</span> tst</pre></div></div>

<p><span id="more-168"></span></p>
<pre>==20777== Memcheck, a memory error detector.
==20777== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al.
==20777== Using LibVEX rev 1884, a library for dynamic binary translation.
==20777== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP.
==20777== Using valgrind-3.4.1-Debian, a dynamic binary instrumentation framework.
==20777== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al.
==20777== For more details, rerun with: -v
==20777==
==20777==
==20777== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 17 from 1)
==20777== malloc/free: in use at exit: 4,000,000 bytes in 1 blocks.
==20777== malloc/free: 1 allocs, 0 frees, 4,000,000 bytes allocated.
==20777== For counts of detected errors, rerun with: -v
==20777== searching for pointers to 1 not-freed blocks.
==20777== checked 93,180 bytes.
==20777==
==20777== LEAK SUMMARY:
==20777==    definitely lost: 0 bytes in 0 blocks.
==20777==      possibly lost: 4,000,000 bytes in 1 blocks.
==20777==    still reachable: 0 bytes in 0 blocks.
==20777==         suppressed: 0 bytes in 0 blocks.
==20777== Rerun with --leak-check=full to see details of leaked memory.</pre>
<p><a class="a2a_button_wykop" href="http://www.addtoany.com/add_to/wykop?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how-to-check-if-program-has-memory-leaks%2F&amp;linkname=%5BLinux%5D%20How%20to%20check%20if%20program%20has%20memory%20leaks" title="Wykop" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/wykop.png" width="16" height="16" alt="Wykop"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how-to-check-if-program-has-memory-leaks%2F&amp;linkname=%5BLinux%5D%20How%20to%20check%20if%20program%20has%20memory%20leaks" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how-to-check-if-program-has-memory-leaks%2F&amp;linkname=%5BLinux%5D%20How%20to%20check%20if%20program%20has%20memory%20leaks" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how-to-check-if-program-has-memory-leaks%2F&amp;linkname=%5BLinux%5D%20How%20to%20check%20if%20program%20has%20memory%20leaks" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how-to-check-if-program-has-memory-leaks%2F&amp;linkname=%5BLinux%5D%20How%20to%20check%20if%20program%20has%20memory%20leaks" title="Digg" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_google_bookmarks" href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how-to-check-if-program-has-memory-leaks%2F&amp;linkname=%5BLinux%5D%20How%20to%20check%20if%20program%20has%20memory%20leaks" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a><a class="a2a_button_msdn" href="http://www.addtoany.com/add_to/msdn?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how-to-check-if-program-has-memory-leaks%2F&amp;linkname=%5BLinux%5D%20How%20to%20check%20if%20program%20has%20memory%20leaks" title="MSDN" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/msdn.png" width="16" height="16" alt="MSDN"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how-to-check-if-program-has-memory-leaks%2F&amp;linkname=%5BLinux%5D%20How%20to%20check%20if%20program%20has%20memory%20leaks" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_technotizie" href="http://www.addtoany.com/add_to/technotizie?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how-to-check-if-program-has-memory-leaks%2F&amp;linkname=%5BLinux%5D%20How%20to%20check%20if%20program%20has%20memory%20leaks" title="Technotizie" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technotizie.png" width="16" height="16" alt="Technotizie"/></a><a class="a2a_button_technet" href="http://www.addtoany.com/add_to/technet?linkurl=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how-to-check-if-program-has-memory-leaks%2F&amp;linkname=%5BLinux%5D%20How%20to%20check%20if%20program%20has%20memory%20leaks" title="TechNet" rel="nofollow" target="_blank"><img src="http://www.wojtekrj.net/wp-content/plugins/add-to-any/icons/technet.png" width="16" height="16" alt="TechNet"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.wojtekrj.net%2F2009%2F04%2Flinux-how-to-check-if-program-has-memory-leaks%2F&amp;title=%5BLinux%5D%20How%20to%20check%20if%20program%20has%20memory%20leaks" id="wpa2a_16">Share/Save</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wojtekrj.net/2009/04/linux-how-to-check-if-program-has-memory-leaks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

