{"id":16195,"date":"2022-03-22T16:55:59","date_gmt":"2022-03-22T16:55:59","guid":{"rendered":"https:\/\/linuxways.net\/?p=16195"},"modified":"2022-03-22T16:55:59","modified_gmt":"2022-03-22T16:55:59","slug":"how-to-save-a-file-in-linux-mint-20-3-using-the-cat-command","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/mint\/how-to-save-a-file-in-linux-mint-20-3-using-the-cat-command\/","title":{"rendered":"How to Save a File in Linux Mint 20.3 Using the Cat Command"},"content":{"rendered":"<h2>Introduction:<\/h2>\n<p>The usage of the cat command in Linux is quite versatile since it can be used to create, read, write, and concatenate files. Apart from this, the cat command can also be used to save the files in Linux. Therefore, in this guide, we will teach you the way of saving a file in Linux Mint 20.3 with the help of the cat command.<\/p>\n<h2>Method of Saving a File in Linux Mint 20.3 using the Cat Command:<\/h2>\n<p>For saving a file in Linux Mint 20.3 using the cat command, you will have to perform the following steps:<\/p>\n<h3>Step # 1: Create a Sample File with the Cat Command:<\/h3>\n<p>First, you need to create a sample file with the command. For that, you can make use of the command shown below:<\/p>\n<pre><strong>$ cat &gt; sample.txt<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"658\" height=\"96\" class=\"wp-image-16196\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/word-image-188.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/word-image-188.png 658w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/word-image-188-300x44.png 300w\" sizes=\"auto, (max-width: 658px) 100vw, 658px\" \/><\/strong><\/p>\n<p>You can replace \u201csample.txt\u201d with any name of your choice for the file that you want to create.<\/p>\n<p>Once you will execute this command, you will be allowed to start typing anything into this file. We have typed some sample content in it as shown in the following image:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"463\" height=\"80\" class=\"wp-image-16197\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/word-image-189.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/word-image-189.png 463w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/word-image-189-300x52.png 300w\" sizes=\"auto, (max-width: 463px) 100vw, 463px\" \/><\/p>\n<h3>Step # 2: Save the Sample File with the Cat Command:<\/h3>\n<p>To save the file created with the cat command within your terminal, you just need to press Ctrl+ D. When you will do that, the control of the terminal will be handed back to you and your file will be saved as shown in the image below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"506\" height=\"95\" class=\"wp-image-16198\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/word-image-190.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/word-image-190.png 506w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/word-image-190-300x56.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/word-image-190-501x95.png 501w\" sizes=\"auto, (max-width: 506px) 100vw, 506px\" \/><\/p>\n<h3>Step # 3: Verify if the Sample File has been saved or not:<\/h3>\n<p>To verify if the sample file has been saved successfully or not, we will view its contents with the cat command by running it as follows:<\/p>\n<pre><strong>$ cat sample.txt<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"343\" height=\"22\" class=\"wp-image-16199\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/word-image-191.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/word-image-191.png 343w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/word-image-191-300x19.png 300w\" sizes=\"auto, (max-width: 343px) 100vw, 343px\" \/><\/strong><\/p>\n<p>The contents of our sample file are shown in the image below. It implies that our sample file was saved successfully with the help of the cat command.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"461\" height=\"97\" class=\"wp-image-16200\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/word-image-192.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/word-image-192.png 461w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/word-image-192-300x63.png 300w\" sizes=\"auto, (max-width: 461px) 100vw, 461px\" \/><\/p>\n<h2>Conclusion:<\/h2>\n<p>This article was meant to guide you about the method of saving a file in Linux Mint 20.3 with the help of the cat command. By using this method, you will now be able to save your files while staying within the terminal very conveniently.<\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction: The usage of the cat command in Linux is quite versatile since it can be used to create, read, write, and concatenate files. Apart from this, the&hellip;<\/p>","protected":false},"author":1,"featured_media":16202,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[264,934,129],"class_list":["post-16195","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mint","tag-cat-command","tag-file","tag-linux-mint-20"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/16195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=16195"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/16195\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/16202"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=16195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=16195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=16195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}