HACKINTOSH.ORG | Macintosh discussion forums

Macintosh News => Apple News => Topic started by: HCK on January 05, 2014, 02:00:15 pm



Title: Master the command line: How to use man pages
Post by: HCK on January 05, 2014, 02:00:15 pm
Master the command line: How to use man pages

<article>
   <section class="page">
<p>
If you’ve read Macworld for any length of time—particularly our OS X Hints blog (http://www.macworld.com/column/macosxhints/) or any other story (http://www.macworld.com/article/2042378/master-the-command-line-navigating-files-and-folders.html) that asks you to use Terminal—you may have wondered to yourself: How do you learn about all those mysterious commands, such as <code>ls</code> or <code>cd</code> (http://www.macworld.com/article/2042378/master-the-command-line-navigating-files-and-folders.html)? Is it some kind of arcane knowledge, handed down only to initiates after grueling initiations? Well, no. Actually, anyone can learn about Terminal commands, if they know where to look. Today, I’ll tell you where.
</p>
<h2>Man up</h2>
<p>
The key to Terminal wisdom is the <code>man</code> command. It summons manual (or man) pages for almost any command; they’re the equivalent of a help system for the command line. In fact, <code>man</code> itself is a command, whose role is to format and display this documentation.
</p>
<p>
First, launch Terminal (in your /Applications/Utilities folder). Then, if you type <code>man pwd</code>, for example, Terminal will display the man page for the <code>pwd</code> command.
</p>
<figure class=" large">(http://images.techhive.com/images/article/2013/07/man-pwd-100046811-large.png)<figcaption>The beginning of the <code>man</code> page for the <code>pwd</code> command.</figcaption></figure>
<p>
All <code>man</code> pages have a common format. They begin with name (the name of the command) and a brief description of what it does. The <code>pwd</code> command I looked at above shows the following:
</p><p class="jumpTag"><a href="/article/2044790/master-the-command-line-how-to-use-man-pages.html#jump">To read this article in full or to leave a comment, please click here[/url]</p></section></article>

Source: Master the command line: How to use man pages (http://www.macworld.com/article/2044790/master-the-command-line-how-to-use-man-pages.html#tk.rss_all)