{"id":3309,"date":"2014-06-17T16:25:33","date_gmt":"2014-06-17T16:25:33","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2014\/06\/17\/more-command\/"},"modified":"2014-06-17T16:25:33","modified_gmt":"2014-06-17T16:25:33","slug":"more-command","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/","title":{"rendered":"more command"},"content":{"rendered":"<p>The <em>more<\/em> command is used to display a small portion of a file at a time. If you wish to see the next entire page, simply press the spacebar. Pressing the <em>enter<\/em> key will simply display the next line of the file. This allows you to browse a file as you desire. It also takes a numeric argument to allow you to display only a certain number of lines initially, or to even begin at a specific line number.<\/p>\n<p><strong>Command: <\/strong>more<br \/> <strong>Synopsis: <\/strong>more [OPTION] [-num] [+\/ pattern] [+ linenum] [file &#8230;] <\/p>\n<p> <strong>Options: <\/strong> <\/p>\n<table class=\"article_table\">\n<tr>\n<th>Option<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td>-c<\/td>\n<td>Do not scroll.  Instead, paint each screen from the top, clearing the remainder of each line as it is displayed.<\/td>\n<\/tr>\n<tr>\n<td>-d<\/td>\n<td><em>More<\/em> will prompt the user with the message &#8220;<quote>[Press space to continue, &#8216;q&#8217; to quit.]<\/quote>&#8221; and will display &#8220;<quote>[Press &#8216;h&#8217; for instructions.]<\/quote>&#8221; instead of ringing the            bell when an illegal key is pressed.<\/td>\n<\/tr>\n<tr>\n<td>-f<\/td>\n<td>Causes <em>more<\/em> to count logical, rather than screen lines (i.e., long lines are not folded).<\/td>\n<\/tr>\n<tr>\n<td>-l<\/td>\n<td><em>More<\/em> usually treats ^L (form feed) as a special character, and will pause after any line that contains a form feed.  The -l option will prevent this behavior.<\/td>\n<\/tr>\n<tr>\n<td>-num<\/td>\n<td>This option specifies an integer which is the screen size (in lines). For example, if you want to use the <em>more<\/em> command and only see only 5 lines, you would use <em>more -5 test.txt<\/em>.<\/td>\n<\/tr>\n<tr>\n<td>-p<\/td>\n<td>Do not scroll.  Instead, clear the whole screen and then display the text.<\/td>\n<\/tr>\n<tr>\n<td>-s<\/td>\n<td>Squeeze multiple blank lines into one.<\/td>\n<\/tr>\n<tr>\n<td>-u<\/td>\n<td>Suppress underlining.<\/td>\n<\/tr>\n<tr>\n<td>+\/<\/td>\n<td>The +\/ option specifies a string that will be searched for before each file is displayed.<\/td>\n<\/tr>\n<tr>\n<td>+num<\/td>\n<td>Start at line number num.<\/td>\n<\/tr>\n<\/table>\n<h2>Examples<\/h2>\n<h3>Base Command<\/h3>\n<p><strong>more<\/strong> &#8211; In this example, we use the base <em>more<\/em> command on a file named <em>test.txt<\/em>. Note at the bottom it tells how much of the file is viewable. In this case, 11%. Pressing the <em>Enter<\/em> key will reveal the next line in the file. <\/p>\n<pre class=\"cli\"> # <span style=\"color:red\">more test.txt<\/span> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi convallis vehicula nisi. Cras consequat consectetur lectus in cursus. Ut vulputate interdum arcu, imperdiet sodales nisl adipiscing vitae. Quisque blandit urna eu neque consectetur, sit amet scelerisque est dapibus. Donec ut euismod arcu. Vivamus sed urna ut eros blandit scelerisque et laoreet magna. Sed vestibulum mauris quis dolor venenatis sagittis. Cras hendrerit cursus turpis vitae volutpat. Donec adipiscing sagittis enim nec lacinia. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque aliquam purus id facilisis lacinia. --More--(11%) <\/pre>\n<\/p>\n<h3>Command with directions<\/h3>\n<p><strong>more -d<\/strong> &#8211; You can think of <em>-d<\/em> as the &#8216;direction&#8217; switch. It prints directions at the bottom of the print. It also prints a help message if the user presses an illegal key. Below we first demonstrate the directions. <\/p>\n<pre class=\"cli\"> # <span style=\"color:red\">more -d test.txt<\/span> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi convallis vehicula nisi. Cras consequat consectetur lectus in cursus. Ut vulputate interdum arcu, imperdiet sodales nisl adipiscing vitae. Quisque blandit urna eu neque consectetur, sit amet scelerisque est dapibus. Donec ut euismod arcu. --More--(5%)[Press space to continue, 'q' to quit.] <\/pre>\n<p> And if the user tries to use an improper command: # <span style=\"color:red\">more -d test.txt<\/span> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi convallis vehicula nisi. Cras consequat consectetur lectus in cursus. Ut vulputate interdum arcu, imperdiet sodales nisl adipiscing vitae. Quisque blandit urna eu neque consectetur, sit amet scelerisque est dapibus. Donec ut euismod arcu. [Press &#8216;h&#8217; for instructions.] <\/p>\n<h3>Display certain number of lines<\/h3>\n<p><strong>more -num<\/strong> &#8211; This option allows you to control the number of lines displayed on the screen. In this example, we only want to show 5 lines on the screen. <\/p>\n<pre class=\"cli\"> # <span style=\"color:red\">more -5 test.txt<\/span> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi convallis vehicula nisi. Cras consequat consectetur lectus in cursus. Ut vulputate interdum arcu, imperdiet sodales nisl adipiscing vitae. Quisque blandit urna eu neque consectetur, sit amet scelerisque est dapibus. Donec ut euismod arcu. --More--(1%) <\/pre>\n<\/p>\n<h3>String Search<\/h3>\n<p><strong>more +\/<\/strong> &#8211; This command searches for a string before printing that information on the screen. Below we search for the string &#8216;Mauris&#8217;. Note that it added a prefix &#8216;&#8230;skipping&#8217; at the top before beginning the printout. <\/p>\n<pre class=\"cli\"> # <span style=\"color:red\">more +\/'Mauris' test.txt<\/span> ...skipping Nunc quis egestas quam.  Mauris ac viverra leo. Cras vehicula magna dolor, sed pharetra tortor condimentum et. Nullam ante dui, gravida in ante eget, auctor convallis mauris. Aenean in blandit libero. Nunc suscipit ultrices odio quis tristique. Proin feugiat turpis elit, et semper turpis pretium sit amet. Praesent ultrices, dui consequat commodo ultricies, velit enim pulvinar libero, posuere consectetur turpis quam vel est. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam cursus diam nunc, nec porttitor elit gravida eu. Donec in neque sapien. Suspendisse porta odio id fermentum placerat. Vivamus aliquam libero id purus bibendum hendrerit. Vivamus molestie eleifend lacus in luctus. Donec vitae lectus eget ligula cursus dapibus. Mauris sollicitudin turpis non mi mattis sodales. Pellentesque vel justo est. --More--(13%) <\/pre>\n<\/p>\n<h3>Start on specific line number<\/h3>\n<p><strong>more +num<\/strong> &#8211; By using the <em>+num<\/em> otpion (where <em>num<\/em> is an actual number), the <em>more<\/em> command will begin at that line number. In this example, we begin at line 5. <\/p>\n<pre class=\"cli\"> # <span style=\"color:red\">more +\/'Mauris' test.txt<\/span> Donec ut euismod arcu. Vivamus sed urna ut eros blandit scelerisque et laoreet magna. Sed vestibulum mauris quis dolor venenatis sagittis. Cras hendrerit cursus turpis vitae volutpat. Donec adipiscing sagittis enim nec lacinia. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque aliquam purus id facilisis lacinia. Sed id rhoncus augue, convallis imperdiet sem. Nunc quis egestas quam. --More--(12%) <\/pre><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The more command is used to display a small portion of a file at a time. If you wish to see the next entire page, simply press the spacebar. Pressing the enter key will simply display the next line of the file. This allows you to browse a file as you desire. It also takes<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/\"> Read More ><\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4308],"tags":[],"class_list":["post-3309","post","type-post","status-publish","format-standard","hentry","category-linux"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>more command | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"Learn how to use the more Linux command.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"more command | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"Learn how to use the more Linux command.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2014-06-17T16:25:33+00:00\" \/>\n<meta name=\"author\" content=\"Scott Mitchell\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Scott Mitchell\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/\"},\"author\":{\"name\":\"Scott Mitchell\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed\"},\"headline\":\"more command\",\"datePublished\":\"2014-06-17T16:25:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/\"},\"wordCount\":532,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"Linux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/\",\"name\":\"more command | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2014-06-17T16:25:33+00:00\",\"description\":\"Learn how to use the more Linux command.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"more command\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed\",\"name\":\"Scott Mitchell\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/scott\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"more command | InMotion Hosting","description":"Learn how to use the more Linux command.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/","og_locale":"en_US","og_type":"article","og_title":"more command | InMotion Hosting","og_description":"Learn how to use the more Linux command.","og_url":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2014-06-17T16:25:33+00:00","author":"Scott Mitchell","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Scott Mitchell","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/"},"author":{"name":"Scott Mitchell","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed"},"headline":"more command","datePublished":"2014-06-17T16:25:33+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/"},"wordCount":532,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["Linux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/","url":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/","name":"more command | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2014-06-17T16:25:33+00:00","description":"Learn how to use the more Linux command.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/more-command\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"more command"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed","name":"Scott Mitchell","url":"https:\/\/www.inmotionhosting.com\/support\/author\/scott\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":null,"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/3309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=3309"}],"version-history":[{"count":0,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/3309\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=3309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=3309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=3309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}