<?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"
	>
<channel>
	<title>Comments on: Quick Unix Tips</title>
	<atom:link href="http://theappleblog.com/2007/01/18/quick-unix-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://theappleblog.com/2007/01/18/quick-unix-tips/</link>
	<description>TheAppleBlog, published by and for the day-to-day Apple user, is a prominent source for news, reviews, walkthroughs, and real life application of all Apple products.</description>
	<pubDate>Fri, 21 Nov 2008 22:34:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Giovanni Caristi</title>
		<link>http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-111317</link>
		<dc:creator>Giovanni Caristi</dc:creator>
		<pubDate>Sat, 27 Oct 2007 15:19:40 +0000</pubDate>
		<guid isPermaLink="false">http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-111317</guid>
		<description>In Leopard, ps -aux won't work anymore, as I painfully discovered.
A "ps aux" wrapper is provided:


The biggest change is in the interpretation of the -u option, which now displays processes belonging to the specified username(s).
Thus, "ps -aux" will fail (unless you want to know about user "x").  As a convenience, however, "ps aux" still works as it did in Tiger.</description>
		<content:encoded><![CDATA[<p>In Leopard, ps -aux won&#8217;t work anymore, as I painfully discovered.<br />
A &#8220;ps aux&#8221; wrapper is provided:</p>
<p>The biggest change is in the interpretation of the -u option, which now displays processes belonging to the specified username(s).<br />
Thus, &#8220;ps -aux&#8221; will fail (unless you want to know about user &#8220;x&#8221;).  As a convenience, however, &#8220;ps aux&#8221; still works as it did in Tiger.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: What is Unix?</title>
		<link>http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-102967</link>
		<dc:creator>What is Unix?</dc:creator>
		<pubDate>Thu, 15 Mar 2007 08:36:06 +0000</pubDate>
		<guid isPermaLink="false">http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-102967</guid>
		<description>To what audience are these 'tips' intended? Listing touchm which one almost never uses, without listing the handy pwd seems unusual. If this is meant as an introduction (and by including cd it must be), then there are some vital commands that have been left out. cat, vi, ls without the redirection of output...</description>
		<content:encoded><![CDATA[<p>To what audience are these &#8216;tips&#8217; intended? Listing touchm which one almost never uses, without listing the handy pwd seems unusual. If this is meant as an introduction (and by including cd it must be), then there are some vital commands that have been left out. cat, vi, ls without the redirection of output&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric F Crist</title>
		<link>http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-99993</link>
		<dc:creator>Eric F Crist</dc:creator>
		<pubDate>Wed, 24 Jan 2007 05:53:15 +0000</pubDate>
		<guid isPermaLink="false">http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-99993</guid>
		<description>In addition to above, if you use the following command, it will run the first, and only run the second if the first exited '0' (zero), meaning successful:

command &#38;&#38; command

You can do this as many times as you want:

touch test.txt &#38;&#38; touch test.txt2 &#38;&#38; touch text.txt3

If you didn't have write perms to the directory you're trying to create the files in, the first would exit 1, and all other commands would simply not be executed.</description>
		<content:encoded><![CDATA[<p>In addition to above, if you use the following command, it will run the first, and only run the second if the first exited &#8216;0&#8242; (zero), meaning successful:</p>
<p>command &amp;&amp; command</p>
<p>You can do this as many times as you want:</p>
<p>touch test.txt &amp;&amp; touch test.txt2 &amp;&amp; touch text.txt3</p>
<p>If you didn&#8217;t have write perms to the directory you&#8217;re trying to create the files in, the first would exit 1, and all other commands would simply not be executed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-99488</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Fri, 19 Jan 2007 17:08:51 +0000</pubDate>
		<guid isPermaLink="false">http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-99488</guid>
		<description>command1 &#124; command2

Does not run command1 followed by command2. The pipe symbol '&#124;' "pipes" the output of command1 into the input of command2. As such, both command1 and command2 run at the same time.

For example:  ps ax &#124; grep Mail

Runs "ps" and then pipes the output of "ps" into "grep". Grep finds any line matching the first argument. In this case, any lines output from ps that contain the word "Mail" will be output by grep.

If you want to run one command followed by another command, the correct syntax is:

command1 ; command2</description>
		<content:encoded><![CDATA[<p>command1 | command2</p>
<p>Does not run command1 followed by command2. The pipe symbol &#8216;|&#8217; &#8220;pipes&#8221; the output of command1 into the input of command2. As such, both command1 and command2 run at the same time.</p>
<p>For example:  ps ax | grep Mail</p>
<p>Runs &#8220;ps&#8221; and then pipes the output of &#8220;ps&#8221; into &#8220;grep&#8221;. Grep finds any line matching the first argument. In this case, any lines output from ps that contain the word &#8220;Mail&#8221; will be output by grep.</p>
<p>If you want to run one command followed by another command, the correct syntax is:</p>
<p>command1 ; command2</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Clair</title>
		<link>http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-99466</link>
		<dc:creator>Clair</dc:creator>
		<pubDate>Fri, 19 Jan 2007 14:37:49 +0000</pubDate>
		<guid isPermaLink="false">http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-99466</guid>
		<description>&lt;b&gt;ps aux&lt;/b&gt; 
is the proper syntax.

&lt;b&gt;ps awwx&lt;/b&gt; 

On the Mac, this command will format the process list so you can actually read the entire line of the process. 

For example if your terminal window is only 80 columns wide, &lt;b&gt;ps aux&lt;/b&gt; will chop off any characters past the 80 column mark will be cut off. This is not very useful if your path is longer than the screen is wide (including the rest of the process information).</description>
		<content:encoded><![CDATA[<p><b>ps aux</b><br />
is the proper syntax.</p>
<p><b>ps awwx</b> </p>
<p>On the Mac, this command will format the process list so you can actually read the entire line of the process. </p>
<p>For example if your terminal window is only 80 columns wide, <b>ps aux</b> will chop off any characters past the 80 column mark will be cut off. This is not very useful if your path is longer than the screen is wide (including the rest of the process information).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: weldon</title>
		<link>http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-99420</link>
		<dc:creator>weldon</dc:creator>
		<pubDate>Fri, 19 Jan 2007 02:21:35 +0000</pubDate>
		<guid isPermaLink="false">http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-99420</guid>
		<description>"touch" will also update the last modified date of a file if it already exists (which is where the name comes from). I know because I got in a bit of trouble with our senior UNIX admin at college when I wrote a script that would wake up every few hours and "touch" all the files in my temp directory so that they wouldn't get deleted by another chron job that cleared out old files.</description>
		<content:encoded><![CDATA[<p>&#8220;touch&#8221; will also update the last modified date of a file if it already exists (which is where the name comes from). I know because I got in a bit of trouble with our senior UNIX admin at college when I wrote a script that would wake up every few hours and &#8220;touch&#8221; all the files in my temp directory so that they wouldn&#8217;t get deleted by another chron job that cleared out old files.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wieger</title>
		<link>http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-99381</link>
		<dc:creator>Wieger</dc:creator>
		<pubDate>Thu, 18 Jan 2007 22:00:54 +0000</pubDate>
		<guid isPermaLink="false">http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-99381</guid>
		<description>Wow cool to see my stuff on the website. I shall try to find some more nice things under the hood of OS X.
I hope you like it:)</description>
		<content:encoded><![CDATA[<p>Wow cool to see my stuff on the website. I shall try to find some more nice things under the hood of OS X.<br />
I hope you like it:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mdmunoz</title>
		<link>http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-99374</link>
		<dc:creator>mdmunoz</dc:creator>
		<pubDate>Thu, 18 Jan 2007 21:11:55 +0000</pubDate>
		<guid isPermaLink="false">http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-99374</guid>
		<description>Ugh. Beaten.</description>
		<content:encoded><![CDATA[<p>Ugh. Beaten.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-99373</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Thu, 18 Jan 2007 21:11:45 +0000</pubDate>
		<guid isPermaLink="false">http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-99373</guid>
		<description>Grr. The &lt;code&gt;&#38;&#38;&lt;/code&gt; above should just be &#38;&#38;</description>
		<content:encoded><![CDATA[<p>Grr. The <code>&amp;&amp;</code> above should just be &amp;&amp;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-99372</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Thu, 18 Jan 2007 21:11:07 +0000</pubDate>
		<guid isPermaLink="false">http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-99372</guid>
		<description>Grr... The "&#38;&#38;amp" above should just be "&#38;&#38;"</description>
		<content:encoded><![CDATA[<p>Grr&#8230; The &#8220;&amp;&amp;amp&#8221; above should just be &#8220;&amp;&amp;&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mdmunoz</title>
		<link>http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-99371</link>
		<dc:creator>mdmunoz</dc:creator>
		<pubDate>Thu, 18 Jan 2007 21:10:48 +0000</pubDate>
		<guid isPermaLink="false">http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-99371</guid>
		<description>Can't you get to the home directory by entering cd with no arguments?</description>
		<content:encoded><![CDATA[<p>Can&#8217;t you get to the home directory by entering cd with no arguments?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-99370</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Thu, 18 Jan 2007 21:10:20 +0000</pubDate>
		<guid isPermaLink="false">http://theappleblog.com/2007/01/18/quick-unix-tips/#comment-99370</guid>
		<description>A couple embellishments:

The &lt;code&gt;~/&lt;/code&gt; is not necessary in the first example; &lt;code&gt;cd&lt;/code&gt; by itself will change the working directory to the current user's home.

The last example is more complicated than the text lets on. The &lt;code&gt;&#124;&lt;/code&gt; character creates what is called a pipe. The pipe redirectes the output (stdout) of the first command into the input (stdin) of the second. See &lt;a href="http://en.wikipedia.org/wiki/Pipeline_%28Unix%29" rel="nofollow"&gt;the Wikipedia "Pipeline" entry&lt;/a&gt; for a decent introduction. Pipes are great for things like &lt;code&gt;ps -aux &#124; grep Finder&lt;/code&gt; (which will find the Finder process).

If all you want to do is run commands in succession then use &lt;code&gt;&#38;&#38;&lt;/code&gt;, which only runs the second if the first is successful.</description>
		<content:encoded><![CDATA[<p>A couple embellishments:</p>
<p>The <code>~/</code> is not necessary in the first example; <code>cd</code> by itself will change the working directory to the current user&#8217;s home.</p>
<p>The last example is more complicated than the text lets on. The <code>|</code> character creates what is called a pipe. The pipe redirectes the output (stdout) of the first command into the input (stdin) of the second. See <a href="http://en.wikipedia.org/wiki/Pipeline_%28Unix%29" rel="nofollow">the Wikipedia &#8220;Pipeline&#8221; entry</a> for a decent introduction. Pipes are great for things like <code>ps -aux | grep Finder</code> (which will find the Finder process).</p>
<p>If all you want to do is run commands in succession then use <code>&amp;&amp;</code>, which only runs the second if the first is successful.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
