{"id":12323,"date":"2026-03-07T10:34:29","date_gmt":"2026-03-07T05:04:29","guid":{"rendered":"https:\/\/www.youstable.com\/blog\/?p=12323"},"modified":"2026-03-07T10:34:42","modified_gmt":"2026-03-07T05:04:42","slug":"grep-command-in-linux","status":"publish","type":"post","link":"https:\/\/www.youstable.com\/blog\/grep-command-in-linux","title":{"rendered":"Grep Command in Linux Complete User Guide (Examples+Tips)"},"content":{"rendered":"\n<p><strong>The grep command in Linux<\/strong> searches text for patterns and returns matching lines. It supports basic, extended, and Perl compatible regular expressions, works recursively across directories, and integrates with pipes for powerful filtering. Use it to scan logs, source code, and configuration files quickly. Syntax: <code>grep [options] PATTERN [FILE...]<\/code>.<\/p>\n\n\n\n<p>If you spend time on Linux servers, learning the grep command in Linux will save hours every week. This guide explains practical grep usage with real examples, covering regex, recursion, file filters, performance tips, and common pitfalls, written from the perspective of day to day systems and hosting operations.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"what-is-grep-and-why-it-matters\">What is Grep and Why it Matters?<\/h2>\n\n\n\n<p>Grep stands for \u201cGlobal Regular Expression Print.\u201d It scans input (files or standard input) and prints lines that match a pattern. It\u2019s fast, script friendly, and essential for developers, sysadmins, and analysts who need to sift through logs, code, and configs on <a href=\"https:\/\/www.youstable.com\/blog\/nstall-node-js-and-npm-windows-macos-linux\/\">Linux or macOS<\/a> terminals.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2848\" height=\"1600\" src=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2025\/12\/image-21.png\" alt=\"What Is Grep and Why It Matters\" class=\"wp-image-12409\" srcset=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2025\/12\/image-21.png 2848w, https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2025\/12\/image-21-150x84.png 150w\" sizes=\"auto, (max-width: 2848px) 100vw, 2848px\" \/><\/figure>\n\n\n\n<p>On production hosts, I\u2019ve used grep to find failing endpoints in gigabytes of web logs, detect malicious access patterns, and locate hardcoded secrets in codebases. With the right flags, it becomes a precise, high speed microscope for your data.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"basic-syntax-and-must-know-options\">Basic Syntax and Must <strong>Know Options<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"core-syntax\"><strong>Core Syntax<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>grep &#91;OPTIONS] PATTERN &#91;FILE...]\n# Example:\ngrep \"error\" \/var\/log\/nginx\/access.log<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"common-options-cheat-sheet\">Common Options Cheat Sheet<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>-i:<\/strong> Case insensitive search<\/li>\n\n\n\n<li><strong>-r or -R:<\/strong> Recursive directory search<\/li>\n\n\n\n<li><strong>-n:<\/strong> Show line numbers<\/li>\n\n\n\n<li><strong>-H:<\/strong> Always show filename<\/li>\n\n\n\n<li><strong>-v:<\/strong> Invert match (show lines that do NOT match)<\/li>\n\n\n\n<li><strong>-w:<\/strong> Match whole words only<\/li>\n\n\n\n<li><strong>-x:<\/strong> Match entire lines only<\/li>\n\n\n\n<li><strong>-c:<\/strong> Count matching lines<\/li>\n\n\n\n<li><strong>-o:<\/strong> Print only the matched part<\/li>\n\n\n\n<li><strong>&#8211;color=auto:<\/strong> Highlight matches (helpful for readability)<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># Case-insensitive search for the word \"error\" and show line numbers\ngrep -inw --color=auto \"error\" app.log\n\n# Show lines that do NOT contain \"200\"\ngrep -v \"200\" access.log\n\n# Count how many lines contain \"timeout\"\ngrep -c \"timeout\" server.log\n\n# Search multiple files with file names\ngrep -H \"TODO\" *.py<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"regular-expressions-in-grep-basic-extended-pcre\">Regular Expressions in Grep (Basic, Extended, PCRE)<\/h2>\n\n\n\n<p>Grep supports different regex engines. By default, it uses Basic Regular Expressions (BRE). Use <code>-E<\/code> for Extended Regular Expressions (ERE), and <code>-P<\/code> for Perl Compatible Regular Expressions (PCRE) where available. The old <code>egrep<\/code> and <code>fgrep<\/code> aliases are deprecated, prefer <code>grep -E<\/code> and <code>grep -F<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"basic-vs-extended-examples\">Basic vs Extended Examples<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Lines starting with \"GET\" (anchor ^)\ngrep \"^GET\" access.log\n\n# Lines ending with \".php\" (anchor $)\ngrep \"\\.php$\" urls.txt\n\n# Using alternation: match foo or bar (with -E for extended)\ngrep -E \"foo|bar\" file.txt\n\n# Match an IP-like pattern (simple, not strict)\ngrep -E \"&#91;0-9]{1,3}(\\.&#91;0-9]{1,3}){3}\" access.log\n\n# Print only the match (useful for extraction)\ngrep -Eo \"&#91;a-f0-9]{32}\" checksums.txt<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"pcre-tips-when-supported\">PCRE Tips (When Supported)<\/h3>\n\n\n\n<p>Some distributions compile grep without <code>-P<\/code> (PCRE). If supported, you can use lookarounds and advanced classes. When <code>-P<\/code> isn\u2019t available, use <code>grep -E<\/code> or tools like ripgrep (<code>rg<\/code>).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Extract emails (PCRE lookaheads\/lookbehinds may vary)\ngrep -Po \"&#91;A-Za-z0-9._%+-]+@&#91;A-Za-z0-9.-]+\\.&#91;A-Za-z]{2,}\" maildump.txt<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"recursive-search-and-file-filtering\">Recursive Search and File Filtering<\/h2>\n\n\n\n<p>Use recursion to search directories. Combine with <code>--include<\/code>, <code>--exclude<\/code>, and <code>--exclude-dir<\/code> to narrow scope and improve speed. The <code>-I<\/code> option treats binary files as non-matching.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Recursively search only .log files for 500 errors\ngrep -R --include=\"*.log\" \" 500 \" \/var\/log\n\n# Ignore vendor and .git directories while searching PHP code for \"TODO\"\ngrep -R --exclude-dir=vendor --exclude-dir=.git --include=\"*.php\" \"TODO\" .\n\n# Treat binary files as non-matching (skip noisy \"Binary file\" messages)\ngrep -R -I \"api_key\" .\n\n# Show file names with matches only\ngrep -Rl \"deprecated_function\" src\/<\/code><\/pre>\n\n\n\n<p>For compressed logs, use zgrep (or gzcat + grep) to search without manual decompression.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Search inside gzip-compressed logs\nzgrep -n \"timeout\" \/var\/log\/nginx\/access.log*.gz\n\n# Or:\ngzcat access.log.1.gz | grep -n \"timeout\"<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"practical-use-cases-for-hosting-devops-and-developers\">Practical Use Cases for Hosting, DevOps, and Developers<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"log-analysis-on-linux-servers\">Log Analysis on Linux Servers<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Find 5xx responses (space-padded for accuracy) in NGINX logs\ngrep -Rnw --include=\"access.log*\" \" 5&#91;0-9]&#91;0-9] \" \/var\/log\/nginx\n\n# Top offending IPs hitting 404 (simple aggregation)\ngrep \" 404 \" access.log | <a href=\"https:\/\/www.youstable.com\/blog\/awk-command\">awk<\/a> '{print $1}' | sort | uniq -c | sort -nr | head<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"security-and-incident-response\">Security and Incident Response<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Detect repeated SSH failures\ngrep -R \"Failed password\" \/var\/log\/auth.log*\n\n# Spot potential SQL injection attempts in web logs\ngrep -R -iE \"union(\\s)+select|information_schema|\/etc\/passwd|sleep\\(&#91;0-9]+\\)\" \/var\/log\/nginx<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"developer-workflows\">Developer Workflows<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Find deprecated PHP functions across the project\ngrep -Rnw --include=\"*.php\" -E \"(mysql_|create_function|each\\()\" .\n\n# Ensure configuration keys exist across environments\ngrep -Rnw --include=\"*.env\" \"^APP_ENV=\" \/var\/www<\/code><\/pre>\n\n\n\n<p>Managing applications on hosting platforms? On YouStable servers, SSH access and comprehensive log retention make grep based troubleshooting straightforward, especially when investigating spikes, slow requests, or bot traffic across access\/error logs.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"combining-grep-with-other-linux-commands\">Combining Grep with Other Linux Commands<\/h2>\n\n\n\n<p>Grep becomes powerful in pipelines. Use it to filter output from system utilities, containers, and package managers.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Processes containing \"nginx\"\nps aux | grep -i nginx\n\n# Kernel messages mentioning I\/O errors\ndmesg | grep -i \"i\/o\"\n\n# Journal entries for a unit\njournalctl -u php-fpm | grep -i \"warning\"\n\n# Network sockets filtered by port\nss -tulpn | grep \":443\"\n\n# Docker logs containing an error pattern\ndocker logs myapp 2&gt;&amp;1 | grep -i \"connection reset\"<\/code><\/pre>\n\n\n\n<p>For large file lists, combine find with grep safely using null-terminated records.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Search only .js files, safely handling spaces\/newlines\nfind . -type f -name \"*.js\" -print0 | xargs -0 grep -nH \"fetch(\"\n\n# Exclude directories during find, then grep\nfind . -type f -not -path \".\/node_modules\/*\" -name \"*.ts\" -print0 | xargs -0 grep -nH \"TODO\"<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"performance-tips-and-scripting-pitfalls\">Performance Tips and Scripting Pitfalls<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"speed-up-grep-on-big-data\">Speed Up Grep on Big Data<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use -F for fixed strings (no regex parsing, often much faster).<\/li>\n\n\n\n<li>Limit work with &#8211;include\/&#8211;exclude and &#8211;exclude-dir.<\/li>\n\n\n\n<li>Prefer anchored patterns (^, $) or -w to reduce matches.<\/li>\n\n\n\n<li>Use -m N to stop after N matches when you only need a sample.<\/li>\n\n\n\n<li>Set LC_ALL=C to speed byte-wise comparisons on ASCII data.<\/li>\n\n\n\n<li>Consider ripgrep (rg) for extremely large trees; it\u2019s optimized and respects .gitignore.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># Fast fixed-string search with locale optimization\nLC_ALL=C grep -RFn --include=\"*.log\" \"Connection timed out\" \/var\/log<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"binary-files-nulls-and-exit-codes\">Binary Files, Nulls, and Exit Codes<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Binary files:<\/strong> Use -I to skip, or &#8211;binary-files=text to force text processing.<\/li>\n\n\n\n<li><strong>Null-terminated mode:<\/strong> grep -z treats NUL as line delimiter for specialized data.<\/li>\n\n\n\n<li><strong>Exit codes: <\/strong>0 if a match is found, 1 if no match, 2 on error. Use -q (quiet) in scripts.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># Quietly test if a string exists; run action on success\nif grep -q \"MAINTENANCE_MODE=on\" .env; then\n  echo \"Maintenance mode enabled\"\nfi<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"avoid-these-common-grep-mistakes\">Avoid These Common Grep Mistakes<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Using unescaped special characters. Example: use &#8220;\\.&#8221; for a literal dot.<\/li>\n\n\n\n<li>Relying on -P when your grep isn\u2019t compiled with PCRE. Check with <code>grep -P<\/code> and handle errors.<\/li>\n\n\n\n<li>Letting the shell expand globs unexpectedly. Quote patterns: <code>grep -E \"foo|bar\" file<\/code>.<\/li>\n\n\n\n<li>Recursing into huge or irrelevant directories. Always pair -R with <code>--exclude-dir<\/code>.<\/li>\n\n\n\n<li>Mismatching word boundaries. For a whole word, use <code>-w<\/code> rather than ad\u2011hoc spaces.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"alternatives-and-related-tools\">Alternatives and Related Tools<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>ripgrep (rg):<\/strong> Very fast recursive search, respects .gitignore. Great for codebases.<\/li>\n\n\n\n<li><strong>ack \/ the_silver_searcher (ag):<\/strong> Developer-focused searchers with sensible defaults.<\/li>\n\n\n\n<li><strong>awk:<\/strong> Pattern scanning with actions; powerful when you need column-aware processing.<\/li>\n\n\n\n<li><strong>sed:<\/strong> Stream editing; ideal for inline replacements after locating matches.<\/li>\n<\/ul>\n\n\n\n<p>For day to day <a href=\"https:\/\/www.youstable.com\/blog\/web-servers-and-explaination\/\">server work<\/a>, grep is foundational. For large monorepos or CI pipelines, ripgrep often provides better performance while preserving familiar patterns.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"real-world-scenarios-and-recipes\">Real World Scenarios and Recipes<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># 1) Audit config for dangerous settings\ngrep -Rnw -E \"PermitRootLogin\\s+yes\" \/etc\/ssh\/sshd_config*\n\n# 2) Extract unique request paths returning 500\ngrep \" 500 \" access.log | awk '{print $7}' | sort | uniq -c | sort -nr | head\n\n# 3) Find secrets accidentally committed (simple patterns)\ngrep -RInE \"(AWS_SECRET|PRIVATE KEY|BEGIN RSA)\" .\n\n# 4) Inspect slow PHP-FPM logs for timeouts\ngrep -Ri \"pool www\" \/var\/log\/php* | grep -i \"slowlog\"\n\n# 5) Get context lines around matches (A=after, B=before, C=both)\ngrep -RinC 2 \"OutOfMemoryError\" \/var\/log\/<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"faqs\">FAQ&#8217;s<\/h2>\n\n\n<div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-question-1765471346348\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"what-does-grep-stand-for\">What does grep stand for?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Grep stands for \u201cGlobal Regular Expression Print.\u201d It searches input for lines matching a pattern and prints them. The name traces back to an ed editor command that performed a similar task.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765471354811\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"how-do-i-use-grep-recursively-in-linux\">How do I use grep recursively in Linux?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Use <code>-R<\/code> (or <code>-r<\/code>) to search subdirectories. Combine with file filters for speed: <code>grep -R --include=\"*.log\" \"error\" \/var\/log<\/code>. Exclude paths using <code>--exclude-dir<\/code>.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765471365795\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"whats-the-difference-between-grep-egrep-and-fgrep\">What\u2019s the difference between grep, egrep, and fgrep?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p><code>grep<\/code> uses basic regex by default. <code>egrep<\/code> (deprecated) equals <code>grep -E<\/code> for extended regex (alternation, +, ? without backslashes). <code>fgrep<\/code> (deprecated) equals <code>grep -F<\/code> for fixed-string matching, which is faster when no regex features are needed.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765471371127\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"how-do-i-make-grep-case-insensitive-and-show-line-numbers\">How do I make grep case insensitive and show line numbers?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Use <code>-i<\/code> for case-insensitive and <code>-n<\/code> for line numbers: <code>grep -in \"timeout\" server.log<\/code>. Add <code>--color=auto<\/code> for highlighting.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765471385311\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"can-grep-use-perl-style-regex-lookaheads-lookbehinds\">Can grep use Perl-style regex (lookaheads, lookbehinds)?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Yes, with <code>-P<\/code> on builds compiled with PCRE. If you see an unsupported error, PCRE isn\u2019t available. Use <code>-E<\/code> for extended regex or switch to ripgrep for PCRE-rich searches.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765471394059\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"how-do-i-exclude-a-directory-or-file-pattern-in-grep\">How do I exclude a directory or file pattern in grep?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Use <code>--exclude<\/code> and <code>--exclude-dir<\/code>. Example: <code>grep -R --exclude-dir=node_modules --include=\"*.ts\" \"fetch(\" .<\/code>. These filters reduce noise and speed up searches.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765471403200\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"what-exit-codes-does-grep-return-and-why-do-they-matter\">What exit codes does grep return, and why do they matter?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Grep exits with 0 when a match is found, 1 when no match is found, and 2 on error. In scripts, <code>grep -q<\/code> is commonly used to check presence without printing output.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>The <a href=\"https:\/\/www.youstable.com\/blog\/grep-command-in-linux\/\"><strong>grep command in Linux is a precision tool for searching<\/strong><\/a> logs, code, and configs at speed. Mastering its flags, regex modes, and pipeline patterns will dramatically accelerate troubleshooting and development. On YouStable servers, SSH and structured logging let you put these techniques to work immediately for faster, clearer diagnostics.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The grep command in Linux searches text for patterns and returns matching lines. It supports basic, extended, and Perl compatible [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":14301,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[350,1195],"tags":[],"class_list":["post-12323","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-knowledgebase","category-blogging"],"acf":[],"featured_image_src":"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2025\/12\/Grep-Command-in-Linux-Complete-User-Guide.jpg","author_info":{"display_name":"Prahlad Prajapati","author_link":"https:\/\/www.youstable.com\/blog\/author\/prahladblog"},"_links":{"self":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/12323","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/comments?post=12323"}],"version-history":[{"count":6,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/12323\/revisions"}],"predecessor-version":[{"id":19244,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/12323\/revisions\/19244"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media\/14301"}],"wp:attachment":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media?parent=12323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/categories?post=12323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/tags?post=12323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}