<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><!-- generator="wordpress/2.3.2" --><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>FreeMacUnix.com</title>
	<link>http://www.freemacunix.com</link>
	<description>Terminal for the Rest of Us</description>
	<pubDate>Mon, 16 Jun 2008 14:16:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/freemacunix" type="application/rss+xml" /><item>
		<title>The kill command</title>
		<link>http://feeds.feedburner.com/~r/freemacunix/~3/313052348/</link>
		<comments>http://www.freemacunix.com/the-kill-command/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 14:16:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Lessons]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.freemacunix.com/the-kill-command/</guid>
		<description><![CDATA[Today we are going to look at a command that you don&#8217;t use very much in a Unix environment. The kill command. It is used when an application is stuck or not responding. The basic form of the command is kill [option]... PID. The PID is the process ID, you can get it by using [...]]]></description>
			<content:encoded><![CDATA[<p>Today we are going to look at a command that you don&#8217;t use very much in a Unix environment. The <code>kill</code> command. It is used when an application is stuck or not responding. The basic form of the command is <code>kill [option]... PID</code>. The PID is the process ID, you can get it by using the <code>top</code> command that I talked about previously. The most common option for the <code>kill</code> command is the <code>-9</code> option. It will kill the process immediately.</p>
<p>Example</p>
<p><code>kill -9 2342</code></p>
<p>If you type <code>top</code> again you should see that the process that was associated with that PID is no longer running.</p>
<img src="http://feeds.feedburner.com/~r/freemacunix/~4/313052348" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.freemacunix.com/the-kill-command/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.freemacunix.com/the-kill-command/</feedburner:origLink></item>
		<item>
		<title>Top</title>
		<link>http://feeds.feedburner.com/~r/freemacunix/~3/281457680/</link>
		<comments>http://www.freemacunix.com/top/#comments</comments>
		<pubDate>Thu, 01 May 2008 13:47:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Lessons]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.freemacunix.com/top/</guid>
		<description><![CDATA[Top is a great command when you are trying to see all of your running processes. It also gives a great deal of other information. It is broken down into four categories - tasks, cpu, mem, and swap. Tasks tells you about the processes that are running. Cpu tells you your processor load. Mem tells [...]]]></description>
			<content:encoded><![CDATA[<p><code>Top</code> is a great command when you are trying to see all of your running processes. It also gives a great deal of other information. It is broken down into four categories - tasks, cpu, mem, and swap. Tasks tells you about the processes that are running. Cpu tells you your processor load. Mem tells you about the total memory you have, how much is being used, and how much is free. Swap Is just like mem except it deals with your swap partition.</p>
<p>Below, you will see all the processes that are running on your computer. It gives most of the info about the processes that you will ever need to know. The main columns I focus on are PID, USER, %CPU, and %MEM. They are to me the most useful. PID is the process ID which is very useful when a program freezes. USER is who is running the program. %CPU is the amount of processing power the program is using. %MEM IS the amount of memory the program is taking up.</p>
<p><code>Top</code> by itself only gives you information on what is running, but when you combine it with other commands, it makes it very powerful. We will get into that next time.</p>
<img src="http://feeds.feedburner.com/~r/freemacunix/~4/281457680" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.freemacunix.com/top/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.freemacunix.com/top/</feedburner:origLink></item>
		<item>
		<title>Searching for a File with a Specific String in the File.</title>
		<link>http://feeds.feedburner.com/~r/freemacunix/~3/264061355/</link>
		<comments>http://www.freemacunix.com/searching-for-a-file-with-a-specific-string-in-the-file/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 15:46:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Lessons]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.freemacunix.com/searching-for-a-file-with-a-specific-string-in-the-file/</guid>
		<description><![CDATA[To accomplish this I am going to show you a new command and then use &#124; and grep with it. The command is locate.  Your computer has a database that has the path names and files that are publicly accessible on your computer. Locate searches that database for all the pathnames and finds the [...]]]></description>
			<content:encoded><![CDATA[<p>To accomplish this I am going to show you a new command and then use <code>|</code> and <code>grep</code> with it. The command is <code>locate</code>.  Your computer has a database that has the path names and files that are publicly accessible on your computer. Locate searches that database for all the pathnames and finds the one you are looking for. It is probably the easiest command to remember and use. You just type locate then what you are looking for.</p>
<p>Example:</p>
<p><code>locate report</code></p>
<p>You can also search for all files with a certain extension.</p>
<p>Example:</p>
<p><code>locate '*.jpg'</code></p>
<p>You may be saying why would I want to do such a specific search? Well lets say you are a web designer that need to modify a template file for all your websites that contain a certain function. Say the function was called capcha and all your template files end in .tpl. You would use you the <code>|</code> command to combine the two function together to accomplish this.</p>
<p>Example:</p>
<p><code>locate '*.tpl' | grep -R 'capcha' *</code></p>
<p>This works by running the <code>locate</code> command and then using <code>grep</code> on just the file names that <code>locate</code> returns. Yes you could just type  <code>grep -R 'capcha' *</code>, but you would have to be in the root directory of your hard drive and the <code>grep</code> command would search every file on our computer. That would take a long time to complete, and if you are running the search on a web server you could bring it to its knees.</p>
<img src="http://feeds.feedburner.com/~r/freemacunix/~4/264061355" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.freemacunix.com/searching-for-a-file-with-a-specific-string-in-the-file/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.freemacunix.com/searching-for-a-file-with-a-specific-string-in-the-file/</feedburner:origLink></item>
		<item>
		<title>Grep</title>
		<link>http://feeds.feedburner.com/~r/freemacunix/~3/258379536/</link>
		<comments>http://www.freemacunix.com/grep/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 15:19:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Essentials]]></category>

		<category><![CDATA[Lessons]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.freemacunix.com/grep/</guid>
		<description><![CDATA[Grep is a very powerful command in the Unix world. It allows you to search for words in documents. This is very useful if you are trying to find bugs in code or just tracking down certain files.
The basic structure of a grep statement is below.
 grep -R "string you are looking for" * 
The [...]]]></description>
			<content:encoded><![CDATA[<p>Grep is a very powerful command in the Unix world. It allows you to search for words in documents. This is very useful if you are trying to find bugs in code or just tracking down certain files.</p>
<p>The basic structure of a grep statement is below.</p>
<p><code> grep -R "string you are looking for" * </code></p>
<p>The -R in the statement means you want to search recursively. Make sure you put the &#8220;&#8221; around your string or you will get an error when you try to execute the command. The * means that the preceding item will be matched zero or more times.</p>
<p>Their are many more options that can be added into the grep function to make it even more useful. To find them type the following into the command line.</p>
<p><code> man grep </code></p>
<img src="http://feeds.feedburner.com/~r/freemacunix/~4/258379536" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.freemacunix.com/grep/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.freemacunix.com/grep/</feedburner:origLink></item>
		<item>
		<title>Pipes</title>
		<link>http://feeds.feedburner.com/~r/freemacunix/~3/220378554/</link>
		<comments>http://www.freemacunix.com/pipes/#comments</comments>
		<pubDate>Tue, 02 Jan 2007 07:44:37 +0000</pubDate>
		<dc:creator>richard</dc:creator>
		
		<category><![CDATA[Definitions]]></category>

		<category><![CDATA[Essentials]]></category>

		<category><![CDATA[Lessons]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.freemacunix.com/pipes/</guid>
		<description><![CDATA[I mentioned previously that Unix uses lots of text files, which are easy to create and manipulate. Unix has a variety of commands to manipulate text files. The way to move text between these commands is with pipes.  The pipe symbol is the vertical bar (&#124;) above your Enter key.
For example, suppose you have [...]]]></description>
			<content:encoded><![CDATA[<p>I mentioned previously that Unix uses lots of <a href="http://www.freemacunix.com/viewing-text-files-cat-head-tail-more-less/">text files</a>, which are easy to create and manipulate. Unix has a variety of commands to manipulate text files. The way to move text between these commands is with <em>pipes</em>.  The pipe symbol is the vertical bar (<code>|</code>) above your Enter key.</p>
<p>For example, suppose you have a text file full of email addresses, with one email address per line. Suppose it&#8217;s named &#8220;emails.txt&#8221; and it&#8217;s on your Desktop.</p>
<p>To view the emails, type the following command in the Terminal:<br />
<code>cat ~/Desktop/emails.txt</code></p>
<p><!-- WP Theme Credits --></p>
<div style="display: none" id="head2">Find how to <a href="http://www.mvlib.com/"><strong>online movie downloads</strong></a>.</div>
<p>To view the emails sorted alphabetically, type the following:<br />
<code>cat ~/Desktop/emails.txt | sort</code></p>
<p>The pipe causes the output of the <code>cat</code> command to be fed into the <code>sort</code> command, then outputted to the screen.  You can tack on as many pipe commands as you need.</p>
<p>To view the emails sorted alphabetically and with a prompt between each page, type:<br />
<code>cat ~/Desktop/emails.txt | sort | more</code></p>
<p>The list of emails &#8220;flows&#8221; from the <code>cat</code> command to the <code>sort</code> command to the <code>more</code> command, as if going through water pipes.</p>
<img src="http://feeds.feedburner.com/~r/freemacunix/~4/220378554" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.freemacunix.com/pipes/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.freemacunix.com/pipes/</feedburner:origLink></item>
		<item>
		<title>Viewing text files: cat, head, tail, more, less</title>
		<link>http://feeds.feedburner.com/~r/freemacunix/~3/220378555/</link>
		<comments>http://www.freemacunix.com/viewing-text-files-cat-head-tail-more-less/#comments</comments>
		<pubDate>Fri, 15 Dec 2006 09:17:23 +0000</pubDate>
		<dc:creator>richard</dc:creator>
		
		<category><![CDATA[Lessons]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.freemacunix.com/viewing-text-files-cat-head-tail-more-less/</guid>
		<description><![CDATA[Many Unix files are text files.  This may seem simplistic, but it&#8217;s actually very powerful.  Text files are easy to create, read, and manipulate.  Many Unix commands are for working with text files.
The first category of Unix commands for working with text files might be called &#8220;text viewers&#8221;.  These includes commands [...]]]></description>
			<content:encoded><![CDATA[<p>Many Unix files are text files.  This may seem simplistic, but it&#8217;s actually very powerful.  Text files are easy to create, read, and manipulate.  Many Unix commands are for working with text files.</p>
<p>The first category of Unix commands for working with text files might be called &#8220;text viewers&#8221;.  These includes commands such as <code>cat</code>, <code>head</code>, <code>tail</code>, <code>more</code>, and <code>less</code>.  All of these commands are used by typing the command plus the name of a file.</p>
<p><code>cat</code> &#8212; Short for &#8220;concatenate&#8221;, this command is used to temporarily combine files.  But if you use it on only one file, it just displays the file to the screen.</p>
<p><code>head</code> &#8212; This command shows the first 10 lines of a file.  (You can adjust the number of lines using the flag <code>-n</code>.)</p>
<p><code>tail</code> &#8212; This command shows the last 10 lines of a file.  (You can also use <code>-n</code> here to show more lines.)</p>
<p><code>more</code> &#8212; Like <code>cat</code>, this shows the entire contents of a file, but prompts you for &#8220;more?&#8221; between each page.  Hit the space bar to go to the next page, or use the up and down arrows.  Hit &#8220;q&#8221; to quit.</p>
<p><code>less</code> &#8212; This is another &#8220;pager&#8221; like <code>more</code>, i.e. it shows one page at a time.  It was meant to be a successor or alternative to <code>more</code> and was hence given the opposite name <code>less</code>.  It had more features than <code>more</code> (sounds like an <a href="http://www.baseball-almanac.com/humor4.shtml">Abbott and Costello</a> routine) when it first came out, but now the two commands are about the same.</p>
<p>Here are some examples:</p>
<p>How to view your <code>hosts</code> file, where you can map host names to IP addresses:<br />
<code>cat /etc/hosts</code></p>
<p>If you have Personal Web Sharing turned on, how to view the last 10 lines of the Apache log file:<br />
<code>tail /var/log/httpd/access_log</code></p>
<p>How to read the Apache configuration file, one page at a time:<br />
<code>more /etc/httpd/httpd.conf</code></p>
<img src="http://feeds.feedburner.com/~r/freemacunix/~4/220378555" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.freemacunix.com/viewing-text-files-cat-head-tail-more-less/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.freemacunix.com/viewing-text-files-cat-head-tail-more-less/</feedburner:origLink></item>
		<item>
		<title>Invisible files</title>
		<link>http://feeds.feedburner.com/~r/freemacunix/~3/220378556/</link>
		<comments>http://www.freemacunix.com/invisible-files/#comments</comments>
		<pubDate>Fri, 01 Dec 2006 09:04:16 +0000</pubDate>
		<dc:creator>richard</dc:creator>
		
		<category><![CDATA[Lessons]]></category>

		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.freemacunix.com/invisible-files/</guid>
		<description><![CDATA[Files that begin with a dot . are invisible to Mac OS X.  They&#8217;re also not typically shown in Unix, but it&#8217;s easy to change that.  For example, if you open Terminal and type ls you&#8217;ll see Desktop, Documents, etc.  But if you type ls -a you&#8217;ll also see additional hidden files [...]]]></description>
			<content:encoded><![CDATA[<p>Files that begin with a dot <code>.</code> are invisible to Mac OS X.  They&#8217;re also not typically shown in Unix, but it&#8217;s easy to change that.  For example, if you open Terminal and type <code>ls</code> you&#8217;ll see Desktop, Documents, etc.  But if you type <code>ls -a</code> you&#8217;ll also see additional hidden files that begin with a dot.</p>
<p>The dot is useful for hiding configuration files that might otherwise clutter your view.  On a web server like Apache, files beginning with a dot can&#8217;t be accessed over the web.  That&#8217;s why you can safely put configuration options for each directory in an <code>.htaccess</code> file.  (If you have a web site, you&#8217;ve almost certainly seen <code>.htaccess</code> files.)</p>
<p>In addition to the Unix method of hiding files by beginning them with a dot, Mac OS X also includes its own unique way of hiding files and folders.  If you install the Developer Tools CD that came with your Mac, you&#8217;ll have access to a <code>SetFile</code> command.   You can type <code>SetFile -aV</code> and the name of a file to make the file invisible.  You can use <code>SetFile -av</code> (lowercase &#8220;v&#8221;) to make the file visible again.</p>
<p>In addition, you can see ALL the files on a computer by using Applications like <a href="http://www.freemacware.com/smultron/">Smultron</a> that have an &#8220;Open Hidden&#8221; option.</p>
<img src="http://feeds.feedburner.com/~r/freemacunix/~4/220378556" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.freemacunix.com/invisible-files/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.freemacunix.com/invisible-files/</feedburner:origLink></item>
		<item>
		<title>Command history</title>
		<link>http://feeds.feedburner.com/~r/freemacunix/~3/220378557/</link>
		<comments>http://www.freemacunix.com/command-history/#comments</comments>
		<pubDate>Thu, 16 Nov 2006 18:52:19 +0000</pubDate>
		<dc:creator>richard</dc:creator>
		
		<category><![CDATA[Lessons]]></category>

		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.freemacunix.com/command-history/</guid>
		<description><![CDATA[Besides tab completion, another way to cut down on the amount of typing you do in Unix is the history command.  Open Terminal, type history and press Enter.  You&#8217;ll see a list of Unix commands you previously typed.  If you&#8217;d like to rerun a command you previously used, you could of course [...]]]></description>
			<content:encoded><![CDATA[<p>Besides <a href="http://www.freemacunix.com/tab-completion/">tab completion</a>, another way to cut down on the amount of typing you do in Unix is the <code>history</code> command.  Open Terminal, type <code>history</code> and press Enter.  You&#8217;ll see a list of Unix commands you previously typed.  If you&#8217;d like to rerun a command you previously used, you could of course Copy and Paste, or you can type an exclamation point (<code>!</code>) and the number of the command.  For instance, if you see that the 10th command in your history is <code>ls -al</code> and you want to run it again, you can type <code>!10</code> and that command will be re-executed.</p>
<p>If you want to simply rerun the last command, you can type <code>!!</code>.</p>
<p>You can also scroll through the command history by pressing the Up and Down arrows at a blank prompt. As soon as you find a command you want to rerun, you can edit it as needed or simply press Enter.</p>
<img src="http://feeds.feedburner.com/~r/freemacunix/~4/220378557" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.freemacunix.com/command-history/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.freemacunix.com/command-history/</feedburner:origLink></item>
		<item>
		<title>Tab completion, part 2</title>
		<link>http://feeds.feedburner.com/~r/freemacunix/~3/220378558/</link>
		<comments>http://www.freemacunix.com/tab-completion-part-2/#comments</comments>
		<pubDate>Thu, 09 Nov 2006 07:10:43 +0000</pubDate>
		<dc:creator>richard</dc:creator>
		
		<category><![CDATA[Lessons]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.freemacunix.com/tab-completion-part-2/</guid>
		<description><![CDATA[In the last post we discussed how tab completion makes typing Unix commands much easier.  The downside, as Janssen pointed out, is that tab completion is case-sensitive, so typing cd doc and hitting tab won&#8217;t complete cd Documents/.  But there&#8217;s a way to change this.
In your home folder you&#8217;ll find a file called [...]]]></description>
			<content:encoded><![CDATA[<p>In the last post we discussed how <a href="http://www.freemacunix.com/tab-completion/">tab completion</a> makes typing Unix commands much easier.  The downside, as Janssen pointed out, is that tab completion is case-sensitive, so typing <code>cd doc</code> and hitting tab won&#8217;t complete <code>cd Documents/</code>.  But there&#8217;s a way to change this.</p>
<p>In your home folder you&#8217;ll find a file called <code>.profile</code> that contains settings for working in the bash shell (which is what you do every time you use Terminal.)  It&#8217;s sort of the &#8220;preferences&#8221; file for the command line.  The <code>.profile</code> file can do a lot of things, one of which is making tab completion case-insensitive.  (We&#8217;ll cover more uses of <code>.profile</code> later.)</p>
<p>Because <code>.profile</code> begins with a dot, it&#8217;s invisible to most Mac OS X applications.  A notable exception is <a href="http://www.freemacware.com/smultron/">Smultron</a>, a free text editor that has an &#8220;Open Hidden&#8221; option.  You can either use Smultron to open <code>.profile</code> in your home folder, or open Terminal and type <code>open .profile</code>, which should open the file in Apple&#8217;s TextEdit.  If you don&#8217;t have this file, you&#8217;ll just create a new empty file by the same name and save it.</p>
<p>The line you&#8217;ll add to <code>.profile</code> is the following:</p>
<p><code>bind "set completion-ignore-case on"</code></p>
<p>If your <code>.profile</code> contains other text, simply put this at the end on its own line.  If you&#8217;re creating <code>.profile</code> from scratch, this is the only line you&#8217;ll need.  Save and close <code>.profile</code>.</p>
<p>After closing and reopening Terminal, your tab completion should now be case-insensitive.  If you type <code>cd doc</code> and hit tab, it should fill in <code>cd Documents/</code>.</p>
<img src="http://feeds.feedburner.com/~r/freemacunix/~4/220378558" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.freemacunix.com/tab-completion-part-2/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.freemacunix.com/tab-completion-part-2/</feedburner:origLink></item>
		<item>
		<title>Tab completion</title>
		<link>http://feeds.feedburner.com/~r/freemacunix/~3/220378559/</link>
		<comments>http://www.freemacunix.com/tab-completion/#comments</comments>
		<pubDate>Tue, 07 Nov 2006 07:42:30 +0000</pubDate>
		<dc:creator>richard</dc:creator>
		
		<category><![CDATA[Essentials]]></category>

		<category><![CDATA[Lessons]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.freemacunix.com/tab-completion/</guid>
		<description><![CDATA[As Nathan Sweeney mentioned in the comments of the last post, there is actually a faster way of &#8220;typing&#8221; Unix commands: the tab key.  Hitting the tab key causes Unix to fill in as much of whatever you&#8217;re typing as possible.  For example, if you open Terminal (you&#8217;ll begin in your Home folder) [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.freemacunix.com/wp-content/uploads/2006/11/brands_left_tab.thumbnail.jpg" alt="Tab soda" class="alignright" />As Nathan Sweeney mentioned in the comments of the last post, there is actually a faster way of &#8220;typing&#8221; Unix commands: the tab key.  Hitting the tab key causes Unix to fill in as much of whatever you&#8217;re typing as possible.  For example, if you open Terminal (you&#8217;ll begin in your Home folder) and want to change to your Documents folder, you&#8217;d normally type <code>cd Documents</code>.  But it&#8217;s much easier with tab completion: type <code>cd Doc</code> and hit tab.  You&#8217;ll notice that Unix fills in the rest of the word &#8220;Documents&#8221;.</p>
<p>You&#8217;ll also notice that tab completion only works when whatever you&#8217;re typing is unique.  (Or rather, it only works to the degree that it is unique.)  For example, if you type <code>cd D</code> from your home directory and hit tab, Unix won&#8217;t fill in anything because it doesn&#8217;t know whether you want <code>cd Desktop</code> or <code>cd Documents</code>.  But if you hit tab a 2nd time, it will display <code>Desktop</code> and <code>Documents</code> to show you your options.  Hitting tab once always causes Unix to fill in as much as it can.  Hitting tab the 2nd time always shows you your options, if any.</p>
<p>You can even use tab completion to select a command.  At the beginning of a command prompt, hitting tab twice will cause Unix to display ALL the commands that are available to you.  There will probably be so many that Unix will ask you if you really want to see them all.  Hit &#8220;y&#8221; to confirm, and then hit &#8220;q&#8221; (quit) when you&#8217;re done.</p>
<p>Tab completion makes it much easier to work with Unix.</p>
<img src="http://feeds.feedburner.com/~r/freemacunix/~4/220378559" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.freemacunix.com/tab-completion/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.freemacunix.com/tab-completion/</feedburner:origLink></item>
	</channel>
</rss>
