<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Stupid Unix trick: why you shouldn&#039;t pipe yes into&#160;yes</title>
	<atom:link href="http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html/feed" rel="self" type="application/rss+xml" />
	<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html</link>
	<description>Brain candy for Happy Mutants</description>
	<lastBuildDate>Mon, 20 May 2013 14:30:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
	<item>
		<title>By: lebel</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1680238</link>
		<dc:creator>lebel</dc:creator>
		<pubDate>Fri, 15 Mar 2013 18:40:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1680238</guid>
		<description>then use $0 instead of ./a. It&#039;ll work from anywhere...</description>
		<content:encoded><![CDATA[<p>then use $0 instead of ./a. It&#8217;ll work from anywhere&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: L_Mariachi</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679771</link>
		<dc:creator>L_Mariachi</dc:creator>
		<pubDate>Fri, 15 Mar 2013 06:49:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679771</guid>
		<description>./ isn&#039;t in $PATH, it is a path.</description>
		<content:encoded><![CDATA[<p>./ isn&#8217;t in $PATH, it is a path.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Symbiote</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679588</link>
		<dc:creator>Symbiote</dc:creator>
		<pubDate>Thu, 14 Mar 2013 23:19:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679588</guid>
		<description>To be a fork bomb it has to make many, many processes (&quot;forking&quot; is the way new processes are made).

The classic example, which you should only try if you have saved all work, is:
&lt;code&gt;: () { :&#124;:&amp; }; :&lt;/code&gt;

It&#039;s perhaps more obvious what&#039;s going on if you replace : with a word and indent:
&lt;code&gt;bomb () {
    bomb &#124; bomb &amp;
};
bomb&lt;/code&gt;

On Linux (I&#039;m not sure about anything else), it is safe (ish) to run &lt;i&gt;only&lt;/i&gt; if you limit the maximum number of processes first, with &lt;code&gt;ulimit -u 100&lt;/code&gt;.</description>
		<content:encoded><![CDATA[<p>To be a fork bomb it has to make many, many processes (&#8220;forking&#8221; is the way new processes are made).</p>
<p>The classic example, which you should only try if you have saved all work, is:<br />
<code>: () { :|:&amp; }; :</code></p>
<p>It&#8217;s perhaps more obvious what&#8217;s going on if you replace : with a word and indent:<br />
<code>bomb () {<br />
    bomb | bomb &amp;<br />
};<br />
bomb</code></p>
<p>On Linux (I&#8217;m not sure about anything else), it is safe (ish) to run <i>only</i> if you limit the maximum number of processes first, with <code>ulimit -u 100</code>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John McCormick</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679510</link>
		<dc:creator>John McCormick</dc:creator>
		<pubDate>Thu, 14 Mar 2013 21:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679510</guid>
		<description>That&#039;s why I use &#039;maybe&#039;. Not as reliable but then i don&#039;t risk big issues with recursion.</description>
		<content:encoded><![CDATA[<p>That&#8217;s why I use &#8216;maybe&#8217;. Not as reliable but then i don&#8217;t risk big issues with recursion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Harrelson</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679495</link>
		<dc:creator>Kevin Harrelson</dc:creator>
		<pubDate>Thu, 14 Mar 2013 21:24:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679495</guid>
		<description> This is called &quot;virtual memory&quot; and has been a feature of every major operating system since Windows 95.  Using too much is a bad idea, however.  As you use more, your system slows down.  I would rather have limits so that my machine just dies rather than get slower and slower until the hard drive is filled.</description>
		<content:encoded><![CDATA[<p> This is called &#8220;virtual memory&#8221; and has been a feature of every major operating system since Windows 95.  Using too much is a bad idea, however.  As you use more, your system slows down.  I would rather have limits so that my machine just dies rather than get slower and slower until the hard drive is filled.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Wright</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679494</link>
		<dc:creator>Chris Wright</dc:creator>
		<pubDate>Thu, 14 Mar 2013 21:23:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679494</guid>
		<description>Why would you put . in $PATH? That gives me the screaming heebie-jeebies, if you know what I mean.</description>
		<content:encoded><![CDATA[<p>Why would you put . in $PATH? That gives me the screaming heebie-jeebies, if you know what I mean.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Smith</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679470</link>
		<dc:creator>Michael Smith</dc:creator>
		<pubDate>Thu, 14 Mar 2013 20:59:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679470</guid>
		<description>Yo should know not to run scripts whjich people post on the internet. There was that clever script which one guy had in his /. sig. I had to give it a go and fortunately my home directory was backed up.</description>
		<content:encoded><![CDATA[<p>Yo should know not to run scripts whjich people post on the internet. There was that clever script which one guy had in his /. sig. I had to give it a go and fortunately my home directory was backed up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Smith</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679467</link>
		<dc:creator>Michael Smith</dc:creator>
		<pubDate>Thu, 14 Mar 2013 20:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679467</guid>
		<description>&lt;a href=&quot;http://www.cryptonomicon.com/beginning.html&quot; rel=&quot;nofollow&quot;&gt;That you, Neal Stephenson?&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p><a href="http://www.cryptonomicon.com/beginning.html" rel="nofollow">That you, Neal Stephenson?</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: billstewart</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679406</link>
		<dc:creator>billstewart</dc:creator>
		<pubDate>Thu, 14 Mar 2013 19:56:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679406</guid>
		<description>This isn&#039;t yes&#124;yes which would do that.  This is 
     $  yes `yes no` 
where your shell runs the right-hand &quot;yes&quot; command and uses its output to build the command string for the left-hand &quot;yes&quot; command
     yes no no no no no no no [ad nauseum]
An old-fashioned shell would have a limited amount of memory available to build the command string, and once it filled it up it would either fail or &quot;succeed&quot; or otherwise stop reading more input, and it&#039;d all be fine, and might or might not try to run the created command.  

Bash and dash and probably some other popular shells will let you create unlimited-length command strings, so they&#039;ll keep malloc()ing more memory until that fails.  The rest of the user&#039;s system presumably reacted the way it would to any command that tried to hog all the memory, but since it was probably the user&#039;s main shell, he interpreted its lack of responsiveness to his input as a system problem.</description>
		<content:encoded><![CDATA[<p>This isn&#8217;t yes|yes which would do that.  This is<br />
     $  yes `yes no`<br />
where your shell runs the right-hand &#8220;yes&#8221; command and uses its output to build the command string for the left-hand &#8220;yes&#8221; command<br />
     yes no no no no no no no [ad nauseum]<br />
An old-fashioned shell would have a limited amount of memory available to build the command string, and once it filled it up it would either fail or &#8220;succeed&#8221; or otherwise stop reading more input, and it&#8217;d all be fine, and might or might not try to run the created command.  </p>
<p>Bash and dash and probably some other popular shells will let you create unlimited-length command strings, so they&#8217;ll keep malloc()ing more memory until that fails.  The rest of the user&#8217;s system presumably reacted the way it would to any command that tried to hog all the memory, but since it was probably the user&#8217;s main shell, he interpreted its lack of responsiveness to his input as a system problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wysinwyg</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679373</link>
		<dc:creator>wysinwyg</dc:creator>
		<pubDate>Thu, 14 Mar 2013 19:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679373</guid>
		<description> Sorry, I didn&#039;t realize that the problem was with the shell invocation and not the program itself.  The point I was actually making -- that this behavior can easily be reproduced on FreeBSD -- stands, however.</description>
		<content:encoded><![CDATA[<p> Sorry, I didn&#8217;t realize that the problem was with the shell invocation and not the program itself.  The point I was actually making &#8212; that this behavior can easily be reproduced on FreeBSD &#8212; stands, however.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Forkboy</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679371</link>
		<dc:creator>Forkboy</dc:creator>
		<pubDate>Thu, 14 Mar 2013 19:16:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679371</guid>
		<description>Don&#039;t know about FreeBSD but it sure knocked my Solaris 10 workstation on its ass.</description>
		<content:encoded><![CDATA[<p>Don&#8217;t know about FreeBSD but it sure knocked my Solaris 10 workstation on its ass.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: billstewart</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679358</link>
		<dc:creator>billstewart</dc:creator>
		<pubDate>Thu, 14 Mar 2013 19:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679358</guid>
		<description>The terminal didn&#039;t crash. The shell (typically bash) running inside the terminal did.  When the shell exited, the terminal knew to go away and clean up after itself.  Try typing &quot;bash&quot; or &quot;sh&quot; from the shell in your terminal window and then running the yes `yes no` stuff inside that - the inner shell will crash, but the outer one will be there and you&#039;ll be able to see the error message.</description>
		<content:encoded><![CDATA[<p>The terminal didn&#8217;t crash. The shell (typically bash) running inside the terminal did.  When the shell exited, the terminal knew to go away and clean up after itself.  Try typing &#8220;bash&#8221; or &#8220;sh&#8221; from the shell in your terminal window and then running the yes `yes no` stuff inside that &#8211; the inner shell will crash, but the outer one will be there and you&#8217;ll be able to see the error message.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: billstewart</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679354</link>
		<dc:creator>billstewart</dc:creator>
		<pubDate>Thu, 14 Mar 2013 18:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679354</guid>
		<description>No, it&#039;s a user who doesn&#039;t understand how the shell works; the operating system is behaving just fine.  the `yes no` generates an infinite amount of output, and hands it to an application (the shell) which needs to stash some of it somewhere before rejecting it or using it for the next step.  It&#039;s doomed to fail; the question is whether it does so gracefully.

Older Unix shells had fairly tight limits on command length, e.g. 1023, while bash and dash seem to keep allocating memory until the operating system won&#039;t give them any more, and then produce error messages and crash. What do your favorite FreeBSD shells do?

I don&#039;t see why the user had to restart his system just because the shell crashed, but I don&#039;t know what environment he was running his shell in.  Ubuntu deals adequately with applications that want to hog all the memory and a bit of extra CPU, but maybe he filled up his disk drive with a core file or something?</description>
		<content:encoded><![CDATA[<p>No, it&#8217;s a user who doesn&#8217;t understand how the shell works; the operating system is behaving just fine.  the `yes no` generates an infinite amount of output, and hands it to an application (the shell) which needs to stash some of it somewhere before rejecting it or using it for the next step.  It&#8217;s doomed to fail; the question is whether it does so gracefully.</p>
<p>Older Unix shells had fairly tight limits on command length, e.g. 1023, while bash and dash seem to keep allocating memory until the operating system won&#8217;t give them any more, and then produce error messages and crash. What do your favorite FreeBSD shells do?</p>
<p>I don&#8217;t see why the user had to restart his system just because the shell crashed, but I don&#8217;t know what environment he was running his shell in.  Ubuntu deals adequately with applications that want to hog all the memory and a bit of extra CPU, but maybe he filled up his disk drive with a core file or something?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: billstewart</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679348</link>
		<dc:creator>billstewart</dc:creator>
		<pubDate>Thu, 14 Mar 2013 18:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679348</guid>
		<description>More precisely, it crashed the shell that was running in the terminal window, and when the shell exited, the terminal window closed down cleanly, just as it would if you&#039;d typed &quot;exit&quot; in the shell.  You can demonstrate this by typing &quot;sh&quot; or &quot;bash&quot; into your shell, and then doing the dangerous stuff in &lt;i&gt;that&lt;/i&gt; shell, which can crash and still leave you a terminal window with the outer shell where you can see the error message.

Pro tip: try several different shells, such as bash and /bin/sh (which seems to be &quot;dash&quot; under Ubuntu), and run ntop in another window to get some feedback on what&#039;s happening.  </description>
		<content:encoded><![CDATA[<p>More precisely, it crashed the shell that was running in the terminal window, and when the shell exited, the terminal window closed down cleanly, just as it would if you&#8217;d typed &#8220;exit&#8221; in the shell.  You can demonstrate this by typing &#8220;sh&#8221; or &#8220;bash&#8221; into your shell, and then doing the dangerous stuff in <i>that</i> shell, which can crash and still leave you a terminal window with the outer shell where you can see the error message.</p>
<p>Pro tip: try several different shells, such as bash and /bin/sh (which seems to be &#8220;dash&#8221; under Ubuntu), and run ntop in another window to get some feedback on what&#8217;s happening.  </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Ercolano</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679318</link>
		<dc:creator>Greg Ercolano</dc:creator>
		<pubDate>Thu, 14 Mar 2013 18:23:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679318</guid>
		<description>Oh wait, I see, this is a command line expansion thing with backquotes.. nevermind! Yeah, I&#039;ll bet that breaks some shells.

Some versions of unix (e.g. many recent releases of OSX) don&#039;t even  enforce ulimit maximums for ram, which means you can crash a mac with a ram eating process, even if the admin set a ram limit for users.. which is a pretty grave omission:
https://discussions.apple.com/thread/3293075?start=0&amp;tstart=0
http://lists.apple.com/archives/unix-porting/2005/Jun/msg00115.html</description>
		<content:encoded><![CDATA[<p>Oh wait, I see, this is a command line expansion thing with backquotes.. nevermind! Yeah, I&#8217;ll bet that breaks some shells.</p>
<p>Some versions of unix (e.g. many recent releases of OSX) don&#8217;t even  enforce ulimit maximums for ram, which means you can crash a mac with a ram eating process, even if the admin set a ram limit for users.. which is a pretty grave omission:<br />
<a href="https://discussions.apple.com/thread/3293075?start=0&#038;tstart=0" rel="nofollow">https://discussions.apple.com/thread/3293075?start=0&#038;tstart=0</a><br />
<a href="http://lists.apple.com/archives/unix-porting/2005/Jun/msg00115.html" rel="nofollow">http://lists.apple.com/archives/unix-porting/2005/Jun/msg00115.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shazbot</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679307</link>
		<dc:creator>Shazbot</dc:creator>
		<pubDate>Thu, 14 Mar 2013 18:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679307</guid>
		<description>yes no &#124; head -256 &#124; say</description>
		<content:encoded><![CDATA[<p>yes no | head -256 | say</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Ercolano</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679294</link>
		<dc:creator>Greg Ercolano</dc:creator>
		<pubDate>Thu, 14 Mar 2013 18:06:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679294</guid>
		<description>Haven&#039;t looked into this, but wondering why the &#039;sender&#039; yes(1)&#039;s write operation isn&#039;t blocking when the pipe&#039;s buffer is full.

It&#039;s my understanding (and a common situation) that if the &#039;receiver&#039; end of a pipe is unable to &quot;keep up&quot;, the sender&#039;s write operation should be blocked for I/O (put to sleep by the kernel) allowing the receiver to catch up and empty the buffer. If the receiver never catches up (ie. second yes(1) not even reading stdin), sender should remain blocked indefinitely. 

No special code should be needed for this; write(2), printf(3), fwrite(3) should all behave this way IIRC, as this sounds like something the kernel should be doing during the low level write(2) operation..</description>
		<content:encoded><![CDATA[<p>Haven&#8217;t looked into this, but wondering why the &#8216;sender&#8217; yes(1)&#8217;s write operation isn&#8217;t blocking when the pipe&#8217;s buffer is full.</p>
<p>It&#8217;s my understanding (and a common situation) that if the &#8216;receiver&#8217; end of a pipe is unable to &#8220;keep up&#8221;, the sender&#8217;s write operation should be blocked for I/O (put to sleep by the kernel) allowing the receiver to catch up and empty the buffer. If the receiver never catches up (ie. second yes(1) not even reading stdin), sender should remain blocked indefinitely. </p>
<p>No special code should be needed for this; write(2), printf(3), fwrite(3) should all behave this way IIRC, as this sounds like something the kernel should be doing during the low level write(2) operation..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maj Variola</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679293</link>
		<dc:creator>Maj Variola</dc:creator>
		<pubDate>Thu, 14 Mar 2013 18:04:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679293</guid>
		<description>Make a file called &quot;a&quot;
In that file put the text &quot;a &amp;&quot;
chmod +x a
./a
Profit.
This would kill a sparcstation </description>
		<content:encoded><![CDATA[<p>Make a file called &#8220;a&#8221;<br />
In that file put the text &#8220;a &amp;&#8221;<br />
chmod +x a<br />
./a<br />
Profit.<br />
This would kill a sparcstation </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mace Moneta</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679292</link>
		<dc:creator>Mace Moneta</dc:creator>
		<pubDate>Thu, 14 Mar 2013 18:03:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679292</guid>
		<description>Which doesn&#039;t work on any distribution with sane limits.</description>
		<content:encoded><![CDATA[<p>Which doesn&#8217;t work on any distribution with sane limits.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chaopoiesis</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679263</link>
		<dc:creator>chaopoiesis</dc:creator>
		<pubDate>Thu, 14 Mar 2013 17:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679263</guid>
		<description>... and don&#039;t beam the planet up in Star Trek.</description>
		<content:encoded><![CDATA[<p>&#8230; and don&#8217;t beam the planet up in Star Trek.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dana Nonsense</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679224</link>
		<dc:creator>Dana Nonsense</dc:creator>
		<pubDate>Thu, 14 Mar 2013 17:04:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679224</guid>
		<description>This is only dangerous if the user has root. Users should almost never be running anything as root.</description>
		<content:encoded><![CDATA[<p>This is only dangerous if the user has root. Users should almost never be running anything as root.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Dennis</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679223</link>
		<dc:creator>Stephen Dennis</dc:creator>
		<pubDate>Thu, 14 Mar 2013 17:03:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679223</guid>
		<description>I recently found this - do not try it:

  Command line Russian roulette 

   [ $[ $RANDOM % 6 ] == 0 ] &amp;&amp; rm -rf / &#124;&#124; echo *Click*</description>
		<content:encoded><![CDATA[<p>I recently found this &#8211; do not try it:</p>
<p>  Command line Russian roulette </p>
<p>   [ $[ $RANDOM % 6 ] == 0 ] &amp;&amp; rm -rf / || echo *Click*</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chas. Owens</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679195</link>
		<dc:creator>Chas. Owens</dc:creator>
		<pubDate>Thu, 14 Mar 2013 16:43:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679195</guid>
		<description>Ah, the Mac explains everything.  Macs don&#039;t run out of memory until they run out of disk space (which will never happen as the machine begins to crawl long before that).</description>
		<content:encoded><![CDATA[<p>Ah, the Mac explains everything.  Macs don&#8217;t run out of memory until they run out of disk space (which will never happen as the machine begins to crawl long before that).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: allium</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679182</link>
		<dc:creator>allium</dc:creator>
		<pubDate>Thu, 14 Mar 2013 16:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679182</guid>
		<description>(raises hand)

Note: I know next to nix about Unix.

A month or so ago I was visiting my brother&#039;s family when my Macbook froze. Force quitting through the keyboard didn&#039;t work, so I powercycled it. Turned it on again, and the main partition was gone - only the rescue and Windows partitions showed. I started up through the rescue partition, and its disk utility indicated the hard drive itself was sound, but the main partition wouldn&#039;t mount. Trying to start up the main partition in command line gave me more specific error codes that indicated its file structure was okay, but its journal was corrupted. The journal can be turned off, but to do so you have to mount the partition, and you can&#039;t mount the partition while its journal is corrupted! :/

After cursing the heavens and doing some research on Google on another computer, I found that going into Terminal, entering &quot;diskutil disableJournal force (partition name)&quot;, ignoring the failure message, and entering &quot;diskutil mount (partition name)&quot; might work. Reset again, the main partition came back, and my niece &amp; nephew got to play WoW again.</description>
		<content:encoded><![CDATA[<p>(raises hand)</p>
<p>Note: I know next to nix about Unix.</p>
<p>A month or so ago I was visiting my brother&#8217;s family when my Macbook froze. Force quitting through the keyboard didn&#8217;t work, so I powercycled it. Turned it on again, and the main partition was gone &#8211; only the rescue and Windows partitions showed. I started up through the rescue partition, and its disk utility indicated the hard drive itself was sound, but the main partition wouldn&#8217;t mount. Trying to start up the main partition in command line gave me more specific error codes that indicated its file structure was okay, but its journal was corrupted. The journal can be turned off, but to do so you have to mount the partition, and you can&#8217;t mount the partition while its journal is corrupted! :/</p>
<p>After cursing the heavens and doing some research on Google on another computer, I found that going into Terminal, entering &#8220;diskutil disableJournal force (partition name)&#8221;, ignoring the failure message, and entering &#8220;diskutil mount (partition name)&#8221; might work. Reset again, the main partition came back, and my niece &amp; nephew got to play WoW again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Clifton</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679178</link>
		<dc:creator>Clifton</dc:creator>
		<pubDate>Thu, 14 Mar 2013 16:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679178</guid>
		<description>To sum up:
&quot;yes&quot; doesn&#039;t kill processes, people kill processes. </description>
		<content:encoded><![CDATA[<p>To sum up:<br />
&#8220;yes&#8221; doesn&#8217;t kill processes, people kill processes. </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Clifton</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679175</link>
		<dc:creator>Clifton</dc:creator>
		<pubDate>Thu, 14 Mar 2013 16:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679175</guid>
		<description>The &quot;yes&quot; program does a fine job of exactly what it&#039;s intended to do, generate an infinite stream of output.  It is not the fault of &quot;yes&quot; if you point that stream somewhere it will cause trouble.

That&#039;s like saying &quot;a circular saw is a badly designed tool&quot; because if you put your hand onto the running blade, it cuts your fingers off, or a fire hose is a badly designed tool because you can&#039;t drink from it.</description>
		<content:encoded><![CDATA[<p>The &#8220;yes&#8221; program does a fine job of exactly what it&#8217;s intended to do, generate an infinite stream of output.  It is not the fault of &#8220;yes&#8221; if you point that stream somewhere it will cause trouble.</p>
<p>That&#8217;s like saying &#8220;a circular saw is a badly designed tool&#8221; because if you put your hand onto the running blade, it cuts your fingers off, or a fire hose is a badly designed tool because you can&#8217;t drink from it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KWillets</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679173</link>
		<dc:creator>KWillets</dc:creator>
		<pubDate>Thu, 14 Mar 2013 16:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679173</guid>
		<description>Yes, it&#039;s just an argument expansion.  The author doesn&#039;t understand how the shell works.  The shell has an argument limit too, which precludes running the first program even if the expansion completes.  That&#039;s why we have xargs.</description>
		<content:encoded><![CDATA[<p>Yes, it&#8217;s just an argument expansion.  The author doesn&#8217;t understand how the shell works.  The shell has an argument limit too, which precludes running the first program even if the expansion completes.  That&#8217;s why we have xargs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Clifton</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679167</link>
		<dc:creator>Clifton</dc:creator>
		<pubDate>Thu, 14 Mar 2013 16:25:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679167</guid>
		<description>To get pedantic, which appears to be the point of this thread, on a Unix or Unix-alike system running your example of &quot;yes no &#124; yes&quot;, both &quot;yes&quot; programs would be started essentially simultaneously.  

The second one would run indefinitely because it&#039;s not checking its input, and as somebody noted upstream, the first one would run for a little bit but would get suspended once the pipe buffer filled, waiting for the second to begin reading it. The net output of the pipeline would be the same as if you had just run &quot;yes&quot;.

It&#039;s good to have a clear mental model of what&#039;s going on when you write shell scripts, and I have written a bunch. </description>
		<content:encoded><![CDATA[<p>To get pedantic, which appears to be the point of this thread, on a Unix or Unix-alike system running your example of &#8220;yes no | yes&#8221;, both &#8220;yes&#8221; programs would be started essentially simultaneously.  </p>
<p>The second one would run indefinitely because it&#8217;s not checking its input, and as somebody noted upstream, the first one would run for a little bit but would get suspended once the pipe buffer filled, waiting for the second to begin reading it. The net output of the pipeline would be the same as if you had just run &#8220;yes&#8221;.</p>
<p>It&#8217;s good to have a clear mental model of what&#8217;s going on when you write shell scripts, and I have written a bunch. </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guillaume Dargaud</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679166</link>
		<dc:creator>Guillaume Dargaud</dc:creator>
		<pubDate>Thu, 14 Mar 2013 16:24:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679166</guid>
		<description>My preferred way to crash a linux PC is to type the following &#039;smiley&#039;:
 :(){ :&amp;:&amp; };:</description>
		<content:encoded><![CDATA[<p>My preferred way to crash a linux PC is to type the following &#8216;smiley&#8217;:<br />
 :(){ :&amp;:&amp; };:</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mongo</title>
		<link>http://boingboing.net/2013/03/14/stupid-unix-trick-why-you-sho.html#comment-1679153</link>
		<dc:creator>mongo</dc:creator>
		<pubDate>Thu, 14 Mar 2013 16:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=218652#comment-1679153</guid>
		<description>But you can search for &quot;Google&quot; on Yahoo and vice-versa.
They&#039;re used to it by now.</description>
		<content:encoded><![CDATA[<p>But you can search for &#8220;Google&#8221; on Yahoo and vice-versa.<br />
They&#8217;re used to it by now.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
