man pageshttp://www.maclife.com/taxonomy/term/14522/all
enTerminal 101: Using Man Pageshttp://www.maclife.com/article/columns/terminal_101_using_man_pages
<!--paging_filter--><p><em><a href="http://www.maclife.com/tags/Terminal_101"><img src="/files/u12635/terminal_101_teaser_47.png" width="150" height="150" class="graphic-right" /></a>Every Monday, we'll show you how to do something new and simple with Apple's built-in command line application. You don't need any fancy software, or a knowledge of coding to do any of these. All you need is a keyboard to type 'em out!<br /><br /></em>Know of a great command line command, but don’t know all of its features or how to use it? If only you had a way to display a manual for the command. Well, as it turns out, there’s a command for just that. Enter “man” (short for manual). Using this command, you can see the command and all of its parameters that can be used with it. Continue reading, and we’ll show you how to take advantage of this built-in guide.</p><h3>Viewing man pages</h3><p>Man pages are essentially built-in guides that are included with commands built into the system, and even packages downloaded and installed from <a href="http://www.maclife.com/article/columns/terminal_101_using_macports_and_homebrew" target="_blank">Homebrew and MacPorts</a>. These manual pages can be viewed by typing in the following command:</p><pre>man commandName</pre><p>Replace “commandName” in the above command with the CLI (command line interface) command that you wish to read more about. For instance, if you wanted to view the manual page for the man command (yes, that exists), you can use the following command:</p><pre>man man</pre><p>After pressing enter, the man page for the command will instantly load, allowing you to see all of the documentation (available flags and their meaning, and other information the developers included).</p><p><a class="thickbox" href="/files/u12635/man_1.png"><img src="/files/u12635/man_1.png" width="620" height="455" class="thickbox" /></a><br />Navigating through the manual is easy: Simply use the keyboard’s space bar to jump down a page in a longer document; or, you can also use the up and down arrow keys on your keyboard to move through the document.</p><h3>Searching through the manual</h3><p><a class="thickbox" href="/files/u12635/man_2.png"><img src="/files/u12635/man_2.png" width="620" height="455" class="thickbox" /></a></p><p>To search for a specific word in the document, simply load up the manual page that you wish to search through, and then use the following shortcut:</p><pre>/searchterm</pre><p>Replace “searchterm” with the term that you wish to search for in the man page. After pressing enter, all of the words in the document matching the search term will be highlighted, and you will be taken to the first match in the document. To go to the next word matching the search term, simply type a forward slash (/) followed by the enter key.</p><h3>Quitting</h3><p>To exit the manual page, simply press the “q” key on your keyboard. The page will close, and you will instantly be taken to back to the command line interface.<br /><br /><em>Cory Bohon is a freelance technology writer, indie Mac and iOS developer, and amateur photographer. <a href="http://twitter.com/coryb" target="_blank">Follow this article's author on Twitter</a>.</em></p>http://www.maclife.com/article/columns/terminal_101_using_man_pages#commentsColumnsDocumentdocumentationMacmanman pagesmanualPagesQuittingReadingsearchingTerminalTerminal 101MacHow-TosMon, 25 Feb 2013 16:00:00 +0000Cory Bohon16256 at http://www.maclife.com