<?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>pastbedti.me &#187; Operatingsystem</title>
	<atom:link href="http://www.pastbedti.me/category/operatingsystem/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pastbedti.me</link>
	<description>About ruby, rails, postgresql and stuff....</description>
	<lastBuildDate>Wed, 01 Jun 2011 20:09:49 +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>Batch rename files with spaces in linux/bash</title>
		<link>http://www.pastbedti.me/2010/10/batch-rename-files-with-spaces-in-linuxbash/</link>
		<comments>http://www.pastbedti.me/2010/10/batch-rename-files-with-spaces-in-linuxbash/#comments</comments>
		<pubDate>Wed, 20 Oct 2010 07:55:04 +0000</pubDate>
		<dc:creator>Mathias Stjernström</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Note to self]]></category>
		<category><![CDATA[Operatingsystem]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Note]]></category>

		<guid isPermaLink="false">http://www.pastbedti.me/?p=676</guid>
		<description><![CDATA[A reminder for myself how to batch rename files with spaces in bash. This is how i rename files with space to have underscores instead. DO NOT blame me if this commando erases all your files I found several examples how to do this when googling but they all failed. Some of them did nothing [...]]]></description>
			<content:encoded><![CDATA[<p>A reminder for myself how to batch rename files with spaces in bash.</p>
<p>This is how i rename files with space to have underscores instead. DO NOT blame me if this commando erases all your files <img src='http://www.pastbedti.me/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   I found several examples how to do this when googling but they all failed. Some of them did nothing and some erased half my filenames. SO IF YOU USE THIS, PLEASE TRY IT IN A FOLDER WITHOUT IMPORTANT FILES FIRST.</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">for</span> f <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">*</span><span style="color: #ff0000;">' '</span><span style="color: #000000; font-weight: bold;">*</span>; <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$f</span>&quot;</span> <span style="color: #ff0000;">&quot;<span style="color: #780078;">`echo $f | sed -e 's/ /_/g'`</span>&quot;</span>; <span style="color: #000000; font-weight: bold;">done</span></div></td></tr></tbody></table></div>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pastbedti.me/2010/10/batch-rename-files-with-spaces-in-linuxbash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>5-10 second delay when launching Terminal.app in OSX</title>
		<link>http://www.pastbedti.me/2009/09/5-10-second-delay-when-launching-terminal-in-osx/</link>
		<comments>http://www.pastbedti.me/2009/09/5-10-second-delay-when-launching-terminal-in-osx/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 20:29:36 +0000</pubDate>
		<dc:creator>Mathias Stjernström</dc:creator>
				<category><![CDATA[Operatingsystem]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://www.pastbedti.me/?p=540</guid>
		<description><![CDATA[A couple of days ago my Terminal.app (console) got a really annoying feature. When launching the console or when I created a new tab it got stuck for about 5-10 seconds before I got my prompt. If you are like me and are spending most of your time in Terminal.app you understand how annoying this [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of days ago my Terminal.app (console) got a really annoying feature. When launching the console or when I created a new tab it got stuck for about 5-10 seconds before I got my prompt. </p>
<p>If you are like me and are spending most of your time in Terminal.app you understand how annoying this is/was. </p>
<p>I tried to rename .profile, .inputrc and evey other startup script I had in my home folder but the problem did not go away. </p>
<p>Then I found an OSX user which had his Terminal crash when started. He solved his problem by cleaning up some OSX systemlogs. So I thought I try the same trick.</p>
<p>The logfiles which he removed where the asl files under /private/var/log/asl/</p>
<p>I read about them here: <a href="http://macosx.com/tech-support/can-i-deleteasl-log/24223.html">http://macosx.com/tech-support/can-i-deleteasl-log/24223.html</a></p>
<p>But I figured I&#8217;d just remove them all <img src='http://www.pastbedti.me/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo rm -rf /private/var/log/asl/*</div></td></tr></tbody></table></div>
<p>When all asl files where removed my Terminal went back to normal again and I am sooooooo relieved. </p>
<p><strong>This worked for me BUT I do not recommend you to remove anything if you do not know what you are doing!!!<br />
</strong><br />
Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pastbedti.me/2009/09/5-10-second-delay-when-launching-terminal-in-osx/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Easy password generating under OS X</title>
		<link>http://www.pastbedti.me/2009/01/easy-password-generating-under-os-x/</link>
		<comments>http://www.pastbedti.me/2009/01/easy-password-generating-under-os-x/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 23:18:15 +0000</pubDate>
		<dc:creator>Mathias Stjernström</dc:creator>
				<category><![CDATA[Mouseless]]></category>
		<category><![CDATA[Operatingsystem]]></category>
		<category><![CDATA[macports]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[passwords]]></category>

		<guid isPermaLink="false">http://www.pastbedti.me/?p=387</guid>
		<description><![CDATA[I generate a loooot of passwords. I try out a lot of webservices and all those needs passwords. I control about 70-100 servers and all those have different services and accounts. So I generate a lot of passwords&#8230; and this post is about how I do it do make it as easy as possible. Using [...]]]></description>
			<content:encoded><![CDATA[<p>I generate a loooot of passwords. I try out a lot of webservices and all those needs passwords. I control about 70-100 servers and all those have different services and accounts. So I generate a lot of passwords&#8230; and this post is about how I do it do make it as easy as possible.<br />
<span id="more-387"></span></p>
<h3>Using pwgen out-of-the-box</h3>
<p>I use pwgen (<a href="http://sourceforge.net/projects/pwgen/">http://sourceforge.net/projects/pwgen/</a>) to generate my passwords. pwgen can be downloaded from sourceforge or installed from MacPorts. </p>
<p>I used to have an alias that looked something like this</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">pwgen</span>=<span style="color: #ff0000;">'pwgen 15'</span></div></td></tr></tbody></table></div>
<p>This command will generate a screen of passwords and I the use the mouse to double click on some random password. This have been great but requires me to move my hand to the mouse which is time consuming. </p>
<h3>Getting rid of the mouse</h3>
<p>So to get rid of the mouse I have created this alias which generates one password and the copies the password to the clipboard.</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">pwgen</span>=<span style="color: #ff0000;">&quot;pwgen -N1 -s 15 | tr -d '<span style="color: #000099; font-weight: bold;">\n</span>' | pbcopy ; echo 'Password copied to clipboard.'&quot;</span></div></td></tr></tbody></table></div>
<p>So my workflow becomes something like shift focus to Terminal with  &#8984; + Tab and then create a new window with  &#8984; + N.<br />
Write pwgen and then close the window with  &#8984; + W and then I am back where I started with a fresh password in my clipboard.</p>
<p>Cheers! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.pastbedti.me/2009/01/easy-password-generating-under-os-x/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Gentoo/Linux freezing under VMware ESX/ESXi</title>
		<link>http://www.pastbedti.me/2008/11/gentoolinux-freezing-under-vmware-esxesxi/</link>
		<comments>http://www.pastbedti.me/2008/11/gentoolinux-freezing-under-vmware-esxesxi/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 22:02:58 +0000</pubDate>
		<dc:creator>Mathias Stjernström</dc:creator>
				<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Operatingsystem]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.pastbedti.me/?p=117</guid>
		<description><![CDATA[We recently got in trouble with two Gentoo machines that where running under VMware ESX &#38; ESXi. The hosts froze randomly (Even the console in vmware froze). Especially when putting a little load on the machines. After hours of testing we found that removing virtual CPU&#8217;s from the host solved the problem. More that one CPU got [...]]]></description>
			<content:encoded><![CDATA[<p>We recently got in trouble with two <a title="Gentoo" href="http://www.gentoo.org/">Gentoo</a> machines that where running under VMware ESX &amp; ESXi.</p>
<p>The hosts froze randomly (<em>Even the console in vmware froze</em>). Especially when putting a little load on the machines. After hours of testing we found that removing virtual CPU&#8217;s from the host solved the problem. More that one CPU got the machine to freeze after some time.</p>
<p><strong>!! Unsatisfied solution !!</strong> So after a couple of more hours we found a working solution&#8230;.</p>
<p><span id="more-117"></span></p>
<p>The solution was to disable the time stamp counter hardware in the host. This is done by passing <strong>notsc</strong> on the kernel command line. </p>
<p>We found people running <a title="Ubuntu" href="http://www.ubuntu.com/">Ubuntu </a>with a similar problem and some of them solved the problem with passing clocksource=acpi_pm on the kernel command line. The clocksource problem is known by VMware and more information can be found here <a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1007020">http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1007020</a>. This did however not solved our problem but some readers may find it helpful. </p>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pastbedti.me/2008/11/gentoolinux-freezing-under-vmware-esxesxi/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>keyFinder v0.5 released</title>
		<link>http://www.pastbedti.me/2008/08/keyfinder-v05-released/</link>
		<comments>http://www.pastbedti.me/2008/08/keyfinder-v05-released/#comments</comments>
		<pubDate>Sun, 03 Aug 2008 21:24:59 +0000</pubDate>
		<dc:creator>Mathias Stjernström</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[frontend]]></category>
		<category><![CDATA[keychain]]></category>
		<category><![CDATA[keyFinder]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[passwords]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://www.stjernstrom.se/?p=56</guid>
		<description><![CDATA[I&#8217;ve just released v0.5 of keyFinder. keyFinder is the simpliest frontend for OSX&#8217;s keychain that you can think of. Its basicly a little window that filters your passwords (live) as you type your keywords. Select the one you want and hit enter. The password then gets copied to your clipboard.  More information can be found [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just released v0.5 of keyFinder. keyFinder is the simpliest frontend for OSX&#8217;s keychain that you can think of. Its basicly a little window that filters your passwords (live) as you type your keywords. Select the one you want and hit enter. The password then gets copied to your clipboard. </p>
<p>More information can be found on the <a href="/projects/keyfinder/" target="_self">keyFinder</a> page under my <a href="/projects/" target="_self">projects</a>.</p>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pastbedti.me/2008/08/keyfinder-v05-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reloading ipfilter rules</title>
		<link>http://www.pastbedti.me/2008/03/reloading-ipfilter-rules/</link>
		<comments>http://www.pastbedti.me/2008/03/reloading-ipfilter-rules/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 18:52:43 +0000</pubDate>
		<dc:creator>Mathias Stjernström</dc:creator>
				<category><![CDATA[Operatingsystem]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[ipfilter]]></category>

		<guid isPermaLink="false">http://stjernstromblog.cust.globalinn.com/?p=8</guid>
		<description><![CDATA[FreeBSD come with a firewall software called IPFILTER (IPF). I dare to say that almost any sysadmin have locked himself out when playing with firewall rules&#8230; . This is a simple tip on how to prevent that from happening when working with IPF. This is how i do it. First make your changes to your [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.freebsd.org/">FreeBSD</a> come with a firewall software called <a href="http://www.freebsd.org/doc/en/books/handbook/firewalls-ipf.html">IPFILTER</a> (IPF).</p>
<blockquote><p>I dare to say that almost any sysadmin have locked himself out when playing with firewall rules&#8230; .</p></blockquote>
<p>This is a simple tip on how to prevent that from happening when working with IPF.</p>
<p><span id="more-8"></span></p>
<h3>This is how i do it.</h3>
<p>First make your changes to your firewall configuration. Lets pretend we have them stored in /etc/ipf.conf.</p>
<p>The goal is to load the new updated configuration in a inactive list and then make that list active.</p>
<p>When the new rules are active we can sleep for a certain amount of time and then automatically switch back to the old rules. This is because if we make an error in the configuration so we get kicked out or any other unpleasant surprises we automatically restore the old state without having to jump into the car and drive to our datacenter.</p>
<p>This is the command we use to load the rules to the inactive list and then make that list active.</p>
<div class="codecolorer-container html4strict twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ipf -IFa -f /etc/ipf.conf ; ipf -s ; sleep 30 ; ipf -s</div></td></tr></tbody></table></div>
<h3>What does all these parameters mean?</h3>
<ul>
<li>-I Set the list to make changes to the inactive list.</li>
<li>-Fa This option specifies which filter list to flush. (&#8220;a&#8221; remove all filter rules).</li>
<li>-f   This  option  specifies  which files ipf should use to get input from for modifying the packet filter rule lists.</li>
<li>-s Swap the active filter list in use to be the  &#8220;other&#8221;  one.</li>
</ul>
<p>This is a real lifesaver. If you are not using IPF find a way to replicate this on your own firewall/os.</p>
<p>Happy firewalling!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pastbedti.me/2008/03/reloading-ipfilter-rules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

