{"id":11048,"date":"2024-02-27T05:43:36","date_gmt":"2024-02-27T05:43:36","guid":{"rendered":"https:\/\/greenwebpage.com\/community\/?p=11048"},"modified":"2024-03-14T09:37:52","modified_gmt":"2024-03-14T09:37:52","slug":"how-to-use-grep-command-in-linux","status":"publish","type":"post","link":"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/","title":{"rendered":"How to Use Grep Command in Linux"},"content":{"rendered":"<p>In Linux, the <strong>grep<\/strong> stands for global regular expression print. It is a simple command that can be utilized to search within text files. With different options, you can customize your searches for specific patterns. Additionally, you can search for or filter patterns within multiple files.<\/p>\n<p>This educational post is about how to use grep commands in Linux.<\/p>\n<h2><strong>How to Use Grep Command in Linux?<\/strong><\/h2>\n<p>Using the following example, you will see the primary uses of the Grep command in Linux.<\/p>\n<p><strong>Example 1: Case Insensitive Search<\/strong><\/p>\n<p>The command is used to search for the pattern &#8220;gnu&#8221; in the file Linux.txt while ignoring the case of the letters, such as &#8220;GNU,&#8221; &#8220;Gnu,&#8221; or &#8220;gnu\u201d:<\/p>\n<table>\n<thead>\n<tr>\n<th>\n<pre>grep -i \"gnu\" Linux.txt<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img fetchpriority=\"high\" decoding=\"async\" width=\"974\" height=\"485\" class=\"wp-image-11049\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-1.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-1.png 974w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-1-300x149.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-1-768x382.png 768w\" sizes=\"(max-width: 974px) 100vw, 974px\" \/> <img decoding=\"async\" width=\"975\" height=\"529\" class=\"wp-image-11050\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-2.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-2.png 975w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-2-300x163.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-2-768x417.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-2-960x520.png 960w\" sizes=\"(max-width: 975px) 100vw, 975px\" \/><\/pre>\n<p>You can notice in the above text that the word \u201cgnu\u201d is highlighted regardless of the case sensitivity.<\/p>\n<p><strong>Example 2: Not Matching a Pattern<\/strong><\/p>\n<p>The <strong>-v<\/strong> option is used to invert matches in grep. The provided command will filter for the whole lines in the file Linux.txt that do not contain the word &#8220;gnu&#8221;:<\/p>\n<table>\n<thead>\n<tr>\n<th>\n<pre>grep -v \"gnu\" Linux.txt<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img decoding=\"async\" width=\"973\" height=\"511\" class=\"wp-image-11051\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-3.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-3.png 973w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-3-300x158.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-3-768x403.png 768w\" sizes=\"(max-width: 973px) 100vw, 973px\" \/> <img loading=\"lazy\" decoding=\"async\" width=\"976\" height=\"442\" class=\"wp-image-11052\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-4.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-4.png 976w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-4-300x136.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-4-768x348.png 768w\" sizes=\"(max-width: 976px) 100vw, 976px\" \/><\/pre>\n<p>The command printed text lines that did not contain the keyword &#8220;gnu.&#8221;<\/p>\n<p><strong>Example 3: Display Line Numbers<\/strong><\/p>\n<p>The command with the <strong>-n<\/strong> option will search for the pattern &#8220;shell&#8221; in the file &#8220;Linux.txt&#8221; and display each matching line along with its line number:<\/p>\n<table>\n<thead>\n<tr>\n<th>\n<pre>grep -n \"shell\" Linux.txt<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"977\" height=\"485\" class=\"wp-image-11053\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-5.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-5.png 977w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-5-300x149.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-5-768x381.png 768w\" sizes=\"(max-width: 977px) 100vw, 977px\" \/> <img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"483\" class=\"wp-image-11054\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-6.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-6.png 975w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-6-300x149.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-6-768x380.png 768w\" sizes=\"(max-width: 975px) 100vw, 975px\" \/><\/pre>\n<p>In the above output command displayed the line number contains the keyword \u201cshell\u201d in your file (i.e. Linux.txt). Thus, you can easily access the pattern by its line number.<\/p>\n<p><strong>Example 4: Count Matches<\/strong><\/p>\n<p>You can use the -c option to search only the total counts for the keyword \u201cshell\u201d in the Linux.txt file:<\/p>\n<table>\n<thead>\n<tr>\n<th>\n<pre>grep -c \"shell\" Linux.txt<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"898\" height=\"79\" class=\"wp-image-11055\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-7.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-7.png 898w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-7-300x26.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-7-768x68.png 768w\" sizes=\"(max-width: 898px) 100vw, 898px\" \/><\/pre>\n<p>Here, you can see there are 40 counts of the keyword &#8220;shell\u201d in your Linux.txt file.<\/p>\n<p><strong>Example 5: Extended Regular Expressions<\/strong><\/p>\n<p>The -E option with grep enables extended regular expressions, allowing you to use the | operator to specify multiple patterns. For example, it searches for lines containing either &#8220;Linux&#8221; or &#8220;shell&#8221; in the Linux.txt file:<\/p>\n<table>\n<thead>\n<tr>\n<th>\n<pre>grep -E \"shell|Linux\" Linux.txt<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"977\" height=\"482\" class=\"wp-image-11056\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-8.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-8.png 977w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-8-300x148.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-8-768x379.png 768w\" sizes=\"(max-width: 977px) 100vw, 977px\" \/> <img loading=\"lazy\" decoding=\"async\" width=\"978\" height=\"511\" class=\"wp-image-11057\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-9.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-9.png 978w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-9-300x157.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-9-768x401.png 768w\" sizes=\"(max-width: 978px) 100vw, 978px\" \/><\/pre>\n<p>This command is primarily used to search multiple patterns in your file.<\/p>\n<p><strong>Example 6: Search for Whole Words<\/strong><\/p>\n<p>If you want to avoid partial matches and search for the whole word &#8220;apt&#8221;, you can run this command from the terminal:<\/p>\n<table>\n<thead>\n<tr>\n<th>\n<pre>grep -w \"apt\" Linux.txt<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"973\" height=\"100\" class=\"wp-image-11058\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-10.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-10.png 973w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-10-300x31.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-10-768x79.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/word-image-11048-10-960x100.png 960w\" sizes=\"(max-width: 973px) 100vw, 973px\" \/><\/pre>\n<p>You can see only the exact matches of the word \u201capt\u201d returned on your terminal window.<\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>With the help of the grep command, you can easily filter and search for one or more patterns within multiple files. You can use different options, including -i for case insensitivity, -n for displaying line numbers, and -c for counting specific patterns, to customize your searches.<\/p>\n\n    <div class=\"xs_social_share_widget xs_share_url after_content \t\tmain_content  wslu-style-1 wslu-share-box-shaped wslu-fill-colored wslu-none wslu-share-horizontal wslu-theme-font-no wslu-main_content\">\n\n\t\t\n        <ul>\n\t\t\t        <\/ul>\n    <\/div> \n","protected":false},"excerpt":{"rendered":"<p>In Linux, the grep stands for global regular expression print. It is a simple command that can be utilized to search within text files. With different options, you can customize your searches for specific patterns. Additionally, you can search for or filter patterns within multiple files. This educational post is about how to use grep [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":11059,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[289,230,290],"class_list":["post-11048","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-grep-commmand","tag-linux","tag-search"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Use Grep Command in Linux - Greenwebpage Community<\/title>\n<meta name=\"description\" content=\"This educational post is about how to use grep commands in Linux.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use Grep Command in Linux - Greenwebpage Community\" \/>\n<meta property=\"og:description\" content=\"This educational post is about how to use grep commands in Linux.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"Greenwebpage Community\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-27T05:43:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-14T09:37:52+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/How-to-Use-Grep-Command-in-Linux.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Karim Buzdar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Karim Buzdar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/\"},\"author\":{\"name\":\"Karim Buzdar\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\"},\"headline\":\"How to Use Grep Command in Linux\",\"datePublished\":\"2024-02-27T05:43:36+00:00\",\"dateModified\":\"2024-03-14T09:37:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/\"},\"wordCount\":429,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/How-to-Use-Grep-Command-in-Linux.jpg\",\"keywords\":[\"Grep Commmand\",\"Linux\",\"Search\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/\",\"name\":\"How to Use Grep Command in Linux - Greenwebpage Community\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/How-to-Use-Grep-Command-in-Linux.jpg\",\"datePublished\":\"2024-02-27T05:43:36+00:00\",\"dateModified\":\"2024-03-14T09:37:52+00:00\",\"description\":\"This educational post is about how to use grep commands in Linux.\",\"breadcrumb\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/#primaryimage\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/How-to-Use-Grep-Command-in-Linux.jpg\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/How-to-Use-Grep-Command-in-Linux.jpg\",\"width\":1020,\"height\":600,\"caption\":\"How to Use Grep Command in Linux\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/greenwebpage.com\/community\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Use Grep Command in Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"name\":\"Greenwebpage Community\",\"description\":\"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.\",\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/greenwebpage.com\/community\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\",\"name\":\"Greenwebpage Community\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"width\":512,\"height\":512,\"caption\":\"Greenwebpage Community\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\",\"name\":\"Karim Buzdar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"caption\":\"Karim Buzdar\"},\"sameAs\":[\"https:\/\/greenwebpage.com\"],\"url\":\"https:\/\/greenwebpage.com\/community\/author\/karim\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Use Grep Command in Linux - Greenwebpage Community","description":"This educational post is about how to use grep commands in Linux.","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:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/","og_locale":"en_US","og_type":"article","og_title":"How to Use Grep Command in Linux - Greenwebpage Community","og_description":"This educational post is about how to use grep commands in Linux.","og_url":"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/","og_site_name":"Greenwebpage Community","article_published_time":"2024-02-27T05:43:36+00:00","article_modified_time":"2024-03-14T09:37:52+00:00","og_image":[{"width":1020,"height":600,"url":"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/How-to-Use-Grep-Command-in-Linux.jpg","type":"image\/jpeg"}],"author":"Karim Buzdar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Karim Buzdar","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/#article","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/"},"author":{"name":"Karim Buzdar","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8"},"headline":"How to Use Grep Command in Linux","datePublished":"2024-02-27T05:43:36+00:00","dateModified":"2024-03-14T09:37:52+00:00","mainEntityOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/"},"wordCount":429,"commentCount":0,"publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/How-to-Use-Grep-Command-in-Linux.jpg","keywords":["Grep Commmand","Linux","Search"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/","url":"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/","name":"How to Use Grep Command in Linux - Greenwebpage Community","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/#website"},"primaryImageOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/#primaryimage"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/How-to-Use-Grep-Command-in-Linux.jpg","datePublished":"2024-02-27T05:43:36+00:00","dateModified":"2024-03-14T09:37:52+00:00","description":"This educational post is about how to use grep commands in Linux.","breadcrumb":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/#primaryimage","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/How-to-Use-Grep-Command-in-Linux.jpg","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/02\/How-to-Use-Grep-Command-in-Linux.jpg","width":1020,"height":600,"caption":"How to Use Grep Command in Linux"},{"@type":"BreadcrumbList","@id":"https:\/\/greenwebpage.com\/community\/how-to-use-grep-command-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/greenwebpage.com\/community\/"},{"@type":"ListItem","position":2,"name":"How to Use Grep Command in Linux"}]},{"@type":"WebSite","@id":"https:\/\/greenwebpage.com\/community\/#website","url":"https:\/\/greenwebpage.com\/community\/","name":"Greenwebpage Community","description":"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.","publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/greenwebpage.com\/community\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/greenwebpage.com\/community\/#organization","name":"Greenwebpage Community","url":"https:\/\/greenwebpage.com\/community\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","width":512,"height":512,"caption":"Greenwebpage Community"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8","name":"Karim Buzdar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","caption":"Karim Buzdar"},"sameAs":["https:\/\/greenwebpage.com"],"url":"https:\/\/greenwebpage.com\/community\/author\/karim\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/11048","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/comments?post=11048"}],"version-history":[{"count":2,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/11048\/revisions"}],"predecessor-version":[{"id":11062,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/11048\/revisions\/11062"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media\/11059"}],"wp:attachment":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media?parent=11048"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/categories?post=11048"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/tags?post=11048"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}