{"id":41108,"date":"2022-05-18T12:30:17","date_gmt":"2022-05-18T17:30:17","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=41108"},"modified":"2022-10-05T05:11:24","modified_gmt":"2022-10-05T10:11:24","slug":"10-basic-cat-commands-in-linux-with-examples","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/","title":{"rendered":"10 basic cat commands in Linux with examples"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><img decoding=\"async\" class=\"aligncenter size-full wp-image-41230\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/04\/basic-cat-commands-in-linux-with-examples.jpg\" alt=\"10 Basic Cat Commands in Linux With Examples\" width=\"742\" height=\"372\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/04\/basic-cat-commands-in-linux-with-examples.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/04\/basic-cat-commands-in-linux-with-examples-300x150.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/04\/basic-cat-commands-in-linux-with-examples-150x75.jpg 150w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/p>\n<p>In this tutorial, we are going to explain some basic cat commands in Linux, that are applicable on various distributions such as Ubuntu, Debian, CentOS, AlmaLinux and etc.<\/p>\n<p>The &#8220;<b>cat<\/b>&#8221; command is a shortcut of the word &#8220;<b>concatenate<\/b>&#8221; and is a very useful command that is frequently used, by system administrators and DevOps engineers. With this command you can easily view files, create them, filter information from them, display line numbers in files and etc.<\/p>\n<p>In this post, the cat command will be explained with real examples on <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting\/\">Ubuntu 20.04<\/a>. You can use the Linux distribution of your choice. Let&#8217;s get started!<\/p>\n<p><!--more--><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69edf3691951c\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69edf3691951c\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/#Prerequisites\" >Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/#Update-the-System\" >Update the System<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/#1-Create-a-File\" >1. Create a File<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/#2-Check-File-Content\" >2. Check File Content<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/#3-Filter-Specific-Content\" >3. Filter Specific Content<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/#4-Print-Line-of-Numbers\" >4. Print Line of Numbers<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/#5-Display-Content-of-Multiple-Files\" >5. Display Content of Multiple Files<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/#6-Reverse-Displaying-of-the-Content\" >6. Reverse Displaying of the Content<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/#7-Append-Text-to-File\" >7. Append Text to File<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/#8-Display-the-head-of-the-file\" >8. Display the head of the file<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/#9-Display-the-tail-of-the-file\" >9. Display the tail of the file<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/#10-The-%E2%80%9Ccat%E2%80%9D-Documentation\" >10. The &#8220;cat&#8221; Documentation<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>Fresh install of Linux distribution<\/li>\n<li>User privileges: root or non-root <a href=\"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-sudo-user-on-centos-7\/\">user with sudo privileges<\/a><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Update-the-System\"><\/span>Update the System<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>It is recommended to update the system packages to the latest versions available after a fresh installation of the server.<\/p>\n<pre>sudo apt update -y &amp;&amp; sudo apt upgrade -y<\/pre>\n<p>Once, the system is updated we are ready to show you the basic cat commands with examples.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"1-Create-a-File\"><\/span>1. Create a File<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To create a file with &#8220;cat&#8221; execute the following command in some directory on your server:<\/p>\n<pre> cd \/opt\r\n\r\ncat &gt; testfile.txt<\/pre>\n<p>Enter some text and press CTRL+D to save the content, of the newly created file.<\/p>\n<p>To check if the file is created successfully list the content of that directory:<\/p>\n<pre>ls -al \/opt<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"2-Check-File-Content\"><\/span>2. Check File Content<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To check the content of a file, you can execute the following command:<\/p>\n<pre>cat \/etc\/apache2\/sites-enabled\/mydomain.conf<\/pre>\n<p>You will receive the output on the command line directly:<\/p>\n<pre>&lt;VirtualHost *:80&gt;\r\n\r\nServerName mydomain.com\r\nServerAlias www.mydomain.com\r\nDocumentRoot \/var\/www\/html\/\r\n\r\nErrorLog ${APACHE_LOG_DIR}\/mydomain.com_error.log\r\nCustomLog ${APACHE_LOG_DIR}\/mydomain.com_access.log combined\r\n\r\n&lt;\/VirtualHost&gt;\r\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"3-Filter-Specific-Content\"><\/span>3. Filter Specific Content<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Sometimes, we need some specific lines of the file to be visible as output and this can be done with the cat and grep commands combined.<\/p>\n<pre>cat \/etc\/apache2\/sites-enabled\/mydomain.conf | grep DocumentRoot<\/pre>\n<p>You should receive the following output:<\/p>\n<pre><b>DocumentRoot<\/b> \/var\/www\/html\/<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"4-Print-Line-of-Numbers\"><\/span>4. Print Line of Numbers<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To print the line of numbers in the file execute the following command:<\/p>\n<pre>cat -n testfile.txt<\/pre>\n<p>You will receive output with numbers before every new line:<\/p>\n<pre>root@vps:\/opt# cat -n testfile.txt\r\n     1  Lorem Ipsum is simply dummy text of the printing and typesetting industry.\r\n     2  Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.\r\n     3  It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.\r\n     4  It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages.\r\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"5-Display-Content-of-Multiple-Files\"><\/span>5. Display Content of Multiple Files<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>We will create three files, test1.txt, test2.txt, and test3.txt with the content &#8220;Test file 1&#8221;, &#8220;Test file 2&#8221;, and &#8220;Test file 3&#8221; respectively. Once created execute the following command to display the content of all three files at once:<\/p>\n<pre>cat test1.txt test2.txt test3.txt<\/pre>\n<p>You will receive the following output:<\/p>\n<pre>root@vps:\/opt# cat test1.txt test2.txt test3.txt\r\nTest file 1\r\nTest file 2\r\nTest file 3\r\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"6-Reverse-Displaying-of-the-Content\"><\/span>6. Reverse Displaying of the Content<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>First, we will create a file with the following content and order:<\/p>\n<pre>First line.\r\nSecond line.\r\nThird line.\r\n<\/pre>\n<p>To display the content of the file in reverse order, execute the following command:<\/p>\n<pre>tac order.txt<\/pre>\n<p>You should receive the following output:<\/p>\n<pre>root@vps:\/opt# tac order.txt\r\nThird line.\r\nSecond line.\r\nFirst line.<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"7-Append-Text-to-File\"><\/span>7. Append Text to File<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To append a new text to the existing file execute the <b>cat &gt;&gt; order.txt<\/b> command, enter the text, and press <b>CTRL + D<\/b> to save the changes.<\/p>\n<pre>cat &gt;&gt; order.txt\r\nThis is a new line. This is the fourth line in the file.\r\n<\/pre>\n<p>Now, check the content of the file with appended text.<\/p>\n<pre>cat order.txt<\/pre>\n<p>You should receive the following output:<\/p>\n<pre>root@vps:\/opt# cat order.txt\r\nFirst line.\r\nSecond line.\r\nThird line.\r\nThis is a new line. This is the fourth line in the file.\r\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"8-Display-the-head-of-the-file\"><\/span>8. Display the head of the file<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To display the head of the file, use the following command:<\/p>\n<pre> cat testfile.txt | head -number<\/pre>\n<p>Where <b>number<\/b> defines how many lines should be displayed from the beginning of the file.<\/p>\n<pre>cat testfile.txt | head -2<\/pre>\n<p>You should receive the following output:<\/p>\n<pre>root@vps:# cat testfile.txt | head -2\r\nLorem Ipsum is simply dummy text of the printing and typesetting industry.\r\nLorem Ipsum has been the industry's standard dummy text ever since the 1500s.<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"9-Display-the-tail-of-the-file\"><\/span>9. Display the tail of the file<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To display the tail of the file, use the following command:<\/p>\n<pre> cat testfile.txt | tail -number<\/pre>\n<p>Where <b>number<\/b> defines how many lines should be displayed from the bottom(last lines) of the file.<\/p>\n<pre>cat testfile.txt | tail -2<\/pre>\n<p>You should receive the following output:<\/p>\n<pre>root@vps:# cat testfile.txt | tail -2\r\nIt has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.\r\nIt was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages.<\/pre>\n<p>To understand better the content of the file with dummy text:<\/p>\n<pre>root@vps:# cat testfile.txt\r\n\r\nLorem Ipsum is simply dummy text of the printing and typesetting industry.\r\nLorem Ipsum has been the industry's standard dummy text ever since the 1500s.\r\nIt has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.\r\nIt was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages.\r\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"10-The-%E2%80%9Ccat%E2%80%9D-Documentation\"><\/span>10. The &#8220;cat&#8221; Documentation<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In this last heading, we are going to show you how to display all options of the cat command for future needs. Execute the command below:<\/p>\n<pre>man cat<\/pre>\n<p>You will receive a huge list of definitions and options with examples.<\/p>\n<pre>root@vps:~# man cat\r\nNAME\r\n       cat - concatenate files and print on the standard output\r\n\r\nSYNOPSIS\r\n       cat [OPTION]... [FILE]...\r\n\r\nDESCRIPTION\r\n       Concatenate FILE(s) to standard output.\r\n\r\n       With no FILE, or when FILE is -, read standard input.\r\n\r\n       -A, --show-all\r\n              equivalent to -vET\r\n\r\n       -b, --number-nonblank\r\n              number nonempty output lines, overrides -n\r\n\r\n       -e     equivalent to -vE\r\n\r\n       -E, --show-ends\r\n              display $ at end of each line\r\n\r\n       -n, --number\r\n              number all output lines\r\n\r\n       -s, --squeeze-blank\r\n              suppress repeated empty output lines\r\n\r\n       -t     equivalent to -vT\r\n\r\n       -T, --show-tabs\r\n              display TAB characters as ^I\r\n<\/pre>\n<p>That&#8217;s it. You were able to learn the basic cat commands on your Linux OS, with real examples and usage.<\/p>\n<p>If you need to filter or display some content of files, and you do not know how to do that, you just need to sign up for one of our <a href=\"https:\/\/www.rosehosting.com\/linux-vps-hosting\/\">Linux VPS plans<\/a>, submit a support ticket and our admins will do the rest. We are available 24\/7.<\/p>\n<p>P.S. If you liked this post about the basic cat commands on Linux with examples, please share it with your friends on the social networks or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we are going to explain some basic cat commands in Linux, that are applicable on various distributions &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"10 basic cat commands in Linux with examples\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/#more-41108\" aria-label=\"Read more about 10 basic cat commands in Linux with examples\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":41230,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1236],"tags":[2003,1619],"class_list":["post-41108","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guides","tag-cat","tag-command","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>10 basic cat commands in Linux with examples | RoseHosting<\/title>\n<meta name=\"description\" content=\"In this tutorial, we are going to explain some basic cat commands in Linux, that are applicable on various distributions.\" \/>\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.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"10 basic cat commands in Linux with examples\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, we are going to explain some basic cat commands in Linux, that are applicable on various distributions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2022-05-18T17:30:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-05T10:11:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/04\/basic-cat-commands-in-linux-with-examples.jpg?v=1650982885\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:description\" content=\"In this tutorial, we are going to explain some basic cat commands in Linux, that are applicable on various distributions.\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\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.rosehosting.com\\\/blog\\\/10-basic-cat-commands-in-linux-with-examples\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/10-basic-cat-commands-in-linux-with-examples\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"10 basic cat commands in Linux with examples\",\"datePublished\":\"2022-05-18T17:30:17+00:00\",\"dateModified\":\"2022-10-05T10:11:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/10-basic-cat-commands-in-linux-with-examples\\\/\"},\"wordCount\":667,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/10-basic-cat-commands-in-linux-with-examples\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/basic-cat-commands-in-linux-with-examples.jpg\",\"keywords\":[\"cat\",\"command\"],\"articleSection\":[\"Guides\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/10-basic-cat-commands-in-linux-with-examples\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/10-basic-cat-commands-in-linux-with-examples\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/10-basic-cat-commands-in-linux-with-examples\\\/\",\"name\":\"10 basic cat commands in Linux with examples | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/10-basic-cat-commands-in-linux-with-examples\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/10-basic-cat-commands-in-linux-with-examples\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/basic-cat-commands-in-linux-with-examples.jpg\",\"datePublished\":\"2022-05-18T17:30:17+00:00\",\"dateModified\":\"2022-10-05T10:11:24+00:00\",\"description\":\"In this tutorial, we are going to explain some basic cat commands in Linux, that are applicable on various distributions.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/10-basic-cat-commands-in-linux-with-examples\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/10-basic-cat-commands-in-linux-with-examples\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/10-basic-cat-commands-in-linux-with-examples\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/basic-cat-commands-in-linux-with-examples.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/basic-cat-commands-in-linux-with-examples.jpg\",\"width\":742,\"height\":372,\"caption\":\"10 Basic Cat Commands in Linux With Examples\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/10-basic-cat-commands-in-linux-with-examples\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"10 basic cat commands in Linux with examples\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"10 basic cat commands in Linux with examples | RoseHosting","description":"In this tutorial, we are going to explain some basic cat commands in Linux, that are applicable on various distributions.","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.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/","og_locale":"en_US","og_type":"article","og_title":"10 basic cat commands in Linux with examples","og_description":"In this tutorial, we are going to explain some basic cat commands in Linux, that are applicable on various distributions.","og_url":"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2022-05-18T17:30:17+00:00","article_modified_time":"2022-10-05T10:11:24+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/04\/basic-cat-commands-in-linux-with-examples.jpg?v=1650982885","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_description":"In this tutorial, we are going to explain some basic cat commands in Linux, that are applicable on various distributions.","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"10 basic cat commands in Linux with examples","datePublished":"2022-05-18T17:30:17+00:00","dateModified":"2022-10-05T10:11:24+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/"},"wordCount":667,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/04\/basic-cat-commands-in-linux-with-examples.jpg","keywords":["cat","command"],"articleSection":["Guides"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/","url":"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/","name":"10 basic cat commands in Linux with examples | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/04\/basic-cat-commands-in-linux-with-examples.jpg","datePublished":"2022-05-18T17:30:17+00:00","dateModified":"2022-10-05T10:11:24+00:00","description":"In this tutorial, we are going to explain some basic cat commands in Linux, that are applicable on various distributions.","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/04\/basic-cat-commands-in-linux-with-examples.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/04\/basic-cat-commands-in-linux-with-examples.jpg","width":742,"height":372,"caption":"10 Basic Cat Commands in Linux With Examples"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/10-basic-cat-commands-in-linux-with-examples\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"10 basic cat commands in Linux with examples"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/41108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=41108"}],"version-history":[{"count":10,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/41108\/revisions"}],"predecessor-version":[{"id":43298,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/41108\/revisions\/43298"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/41230"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=41108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=41108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=41108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}