{"id":222,"date":"2024-01-25T01:41:11","date_gmt":"2024-01-25T01:41:11","guid":{"rendered":"https:\/\/resellerjungle.com\/articles\/?p=222"},"modified":"2024-01-25T02:27:29","modified_gmt":"2024-01-25T02:27:29","slug":"12-useful-grep-command-in-linux","status":"publish","type":"post","link":"https:\/\/resellerjungle.com\/articles\/12-useful-grep-command-in-linux\/","title":{"rendered":"12 Useful \u2018grep\u2019 Command in Linux"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The grep command in <a href=\"https:\/\/www.linux.org\/\" data-type=\"link\" data-id=\"https:\/\/www.linux.org\/\" target=\"_blank\" rel=\"noopener\">Linux <\/a>is used for searching patterns in text files. It is a powerful and versatile tool. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The name &#8220;grep&#8221; stands for &#8220;Global Regular Expression Print.&#8221; It allows users to search for a specific pattern or regular expression in one or more files, and it prints the lines containing the matched pattern.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The basic syntax of the <code>grep<\/code> command is as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep &#91;options] pattern &#91;file...]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Here, <code>pattern<\/code> is the text or regular expression you want to search for, and <code>file<\/code> is the name of the file or files in which you want to perform the search. If no file is specified, <code>grep<\/code> reads from standard input (e.g., data piped from another command).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Some commonly used options with <code>grep<\/code> include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-i<\/code>: Perform a case-insensitive search.<\/li>\n\n\n\n<li><code>-n<\/code>: Display line numbers along with the matching lines.<\/li>\n\n\n\n<li><code>-r<\/code> or <code>-R<\/code>: Recursively search directories.<\/li>\n\n\n\n<li><code>-v<\/code>: Invert the match to show lines that do not contain the pattern.<\/li>\n\n\n\n<li><code>-o<\/code>: Display only the matching part of lines.<\/li>\n\n\n\n<li><code>-w<\/code>: Match whole words only.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><code>grep<\/code> is widely used in Linux command-line environments for tasks like log analysis, text processing, and system administration. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It supports regular expressions, allowing for complex and flexible pattern matching. The command is an essential tool for efficiently extracting information from text files and streams.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In a <a href=\"https:\/\/resellerjungle.com\/#\" data-type=\"link\" data-id=\"https:\/\/resellerjungle.com\/#\">hosting environment<\/a>, you might use the <code>grep<\/code> command for various tasks related to text searching and manipulation. For example:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Log Analysis:<\/strong> Hosting providers often provide log files for your server. You can use <code>grep<\/code> to search through these logs for specific patterns, errors, or information.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep \"error\" \/path\/to\/logfile<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Configuration Files:<\/strong> You can use <code>grep<\/code> to find specific configurations within files.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep \"DocumentRoot\" \/etc\/apache2\/sites-available\/*.conf<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Search for Running Processes:<\/strong> You can use <code>ps<\/code> command along with <code>grep<\/code> to filter running processes.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ps aux | grep \"process_name\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Check Server Status:<\/strong> You might use <code>grep<\/code> in combination with other commands to check server status or resource usage.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>top | grep \"process_name\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Here are some common examples of how to use the grep command:<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#1-basic-search-of-grep-command\">1.Basic Search of grep command:<\/a><\/li><li><a href=\"#2-case-insensitive-search\">2.Case-Insensitive Search:<\/a><\/li><li><a href=\"#3-recursive-search-in-directories\">3.Recursive Search in Directories:<\/a><\/li><li><a href=\"#4-show-line-numbers\">4.Show Line Numbers:<\/a><\/li><li><a href=\"#5-counting-matches\">5.Counting Matches:<\/a><\/li><li><a href=\"#6-invert-match\">6.Invert Match:<\/a><\/li><li><a href=\"#7-display-matching-part-only\">7.Display Matching Part Only:<\/a><\/li><li><a href=\"#8-using-regular-expressions\">8.Using Regular Expressions:<\/a><\/li><li><a href=\"#9-search-multiple-patterns\">9.Search Multiple Patterns:<\/a><\/li><li><a href=\"#10-show-filename-with-matches\">10.Show Filename with Matches:<\/a><\/li><li><a href=\"#11-search-for-whole-words\">11.Search for Whole Words:<\/a><\/li><li><a href=\"#12-recursive-search-with-line-numbers\">12.Recursive Search with Line Numbers:<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"1-basic-search-of-grep-command\">1.Basic Search of grep command:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep \"pattern\" filename<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>grep \"Hosting\" articles.txt<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"62\" src=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-1024x62.png\" alt=\"\" class=\"wp-image-232\" srcset=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-1024x62.png 1024w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-300x18.png 300w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-768x47.png 768w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image.png 1088w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This searches for the specified &#8220;pattern&#8221; in the given &#8220;filename.&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"2-case-insensitive-search\">2.Case-Insensitive Search:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -i \"pattern\" filename<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">-i option makes the search case-insensitive.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"54\" src=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-1-1024x54.png\" alt=\"\" class=\"wp-image-233\" srcset=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-1-1024x54.png 1024w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-1-300x16.png 300w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-1-768x40.png 768w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-1.png 1238w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"3-recursive-search-in-directories\">3.Recursive Search in Directories:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -r \"pattern\" directory<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">-r option enables a recursive search in the specified directory.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -r \"resellerjungle\" \/home\/<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"229\" src=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-2-1024x229.png\" alt=\"\" class=\"wp-image-234\" srcset=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-2-1024x229.png 1024w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-2-300x67.png 300w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-2-768x172.png 768w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-2-1536x343.png 1536w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-2.png 1772w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"4-show-line-numbers\">4.Show Line Numbers:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -n \"pattern\" filename<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">-n option shows line numbers along with the matching lines.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -n \"articles\" file2.txt<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"51\" src=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-3-1024x51.png\" alt=\"\" class=\"wp-image-235\" srcset=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-3-1024x51.png 1024w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-3-300x15.png 300w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-3-768x38.png 768w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-3.png 1243w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"5-counting-matches\">5.Counting Matches:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -c \"pattern\" filename<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">-c option counts the number of lines that match the pattern.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -c \"Welcome\" articles.txt<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"53\" src=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-4-1024x53.png\" alt=\"\" class=\"wp-image-236\" srcset=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-4-1024x53.png 1024w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-4-300x15.png 300w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-4-768x39.png 768w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-4.png 1148w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"6-invert-match\">6.Invert Match:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -v \"pattern\" filename<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">-v option inverts the match, showing lines that do not contain the pattern.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -v \"Web\" file2.txt<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"54\" src=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-5-1024x54.png\" alt=\"\" class=\"wp-image-237\" srcset=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-5-1024x54.png 1024w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-5-300x16.png 300w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-5-768x41.png 768w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-5.png 1205w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"7-display-matching-part-only\">7.Display Matching Part Only:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -o \"pattern\" filename<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">-o option displays only the matching part of the lines.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -o \"articles\" file1.txt<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"54\" src=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-6-1024x54.png\" alt=\"\" class=\"wp-image-238\" srcset=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-6-1024x54.png 1024w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-6-300x16.png 300w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-6-768x41.png 768w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-6.png 1080w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"8-using-regular-expressions\">8.Using Regular Expressions:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep \"^&#91;0-9]\" filename<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Searches for lines starting with a digit (regular expression).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep \"^&#91;0-9]\" file3.txt<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"97\" src=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-7-1024x97.png\" alt=\"\" class=\"wp-image-239\" srcset=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-7-1024x97.png 1024w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-7-300x28.png 300w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-7-768x73.png 768w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-7.png 1256w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"9-search-multiple-patterns\">9.Search Multiple Patterns:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -e \"pattern1\" -e \"pattern2\" filename<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Searches for lines matching either &#8220;pattern1&#8221; or &#8220;pattern2.&#8221;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -e \"blog\" -e \"plans\" file3.txt<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"74\" src=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-8-1024x74.png\" alt=\"\" class=\"wp-image-240\" srcset=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-8-1024x74.png 1024w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-8-300x22.png 300w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-8-768x55.png 768w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-8.png 1233w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"10-show-filename-with-matches\">10.Show Filename with Matches:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -H \"pattern\" *<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">-H option shows the filename along with the matching lines when searching in multiple files.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -H \"articles\" *<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"123\" src=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-9-1024x123.png\" alt=\"\" class=\"wp-image-241\" srcset=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-9-1024x123.png 1024w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-9-300x36.png 300w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-9-768x92.png 768w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-9.png 1496w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"11-search-for-whole-words\">11.Search for Whole Words:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -w \"word\" filename<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">-w option matches whole words only.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -w \"blog\" file1.txt<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"52\" src=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-10-1024x52.png\" alt=\"\" class=\"wp-image-244\" srcset=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-10-1024x52.png 1024w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-10-300x15.png 300w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-10-768x39.png 768w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-10.png 1198w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"12-recursive-search-with-line-numbers\">12.Recursive Search with Line Numbers:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -rn \"pattern\" directory<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">-rn option enables a recursive search with line numbers.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -rn \"articles\" \/home\/resellerjungle\/<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"101\" src=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-11-1024x101.png\" alt=\"\" class=\"wp-image-245\" srcset=\"https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-11-1024x101.png 1024w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-11-300x30.png 300w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-11-768x76.png 768w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-11-1536x152.png 1536w, https:\/\/resellerjungle.com\/articles\/wp-content\/uploads\/2024\/01\/image-11.png 1817w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These are just a few examples, and grep has many more options and capabilities. You can explore the manual page (man grep) for a comprehensive list of options and details on using the command.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The grep command in Linux is used for searching patterns in text files. It is a powerful and versatile tool.&hellip;<\/p>\n","protected":false},"author":2,"featured_media":250,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[16],"class_list":["post-222","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-grep"],"_links":{"self":[{"href":"https:\/\/resellerjungle.com\/articles\/wp-json\/wp\/v2\/posts\/222","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/resellerjungle.com\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/resellerjungle.com\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/resellerjungle.com\/articles\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/resellerjungle.com\/articles\/wp-json\/wp\/v2\/comments?post=222"}],"version-history":[{"count":10,"href":"https:\/\/resellerjungle.com\/articles\/wp-json\/wp\/v2\/posts\/222\/revisions"}],"predecessor-version":[{"id":249,"href":"https:\/\/resellerjungle.com\/articles\/wp-json\/wp\/v2\/posts\/222\/revisions\/249"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/resellerjungle.com\/articles\/wp-json\/wp\/v2\/media\/250"}],"wp:attachment":[{"href":"https:\/\/resellerjungle.com\/articles\/wp-json\/wp\/v2\/media?parent=222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/resellerjungle.com\/articles\/wp-json\/wp\/v2\/categories?post=222"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/resellerjungle.com\/articles\/wp-json\/wp\/v2\/tags?post=222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}