The grep -inr command is a combination of several grep options used to search for a string in files and directories recursively. Here's a breakdown:

Syntax

grep -inr "pattern" /path/to/search

Options explained:

  • -iIgnore case (case-insensitive search)

  • -nShow line numbers in the output

  • -rRecursive search through directories

Example:

 
grep -inr "error" /var/log

This will search for the word "error" (case-insensitively) in all files under /var/log, displaying line numbers and filenames.

Sample output:

/var/log/syslog:103:error reading file /var/log/syslog:205:Error occurred while starting service

Let me know if you want to add more filters, like file extensions (--include="*.log") or excluding certain directories (--exclude-dir="tmp").

posted @ 2025-06-06 04:32 功夫 熊猫 阅读(4) 评论(0) 推荐(0)
摘要: Grandpa's hands, weathered and wise, write a poem about gradpa randpa's hands, weathered and wise,Tell stories of days beneath endless skies.They’ve b 阅读全文
posted @ 2025-01-28 09:40 功夫 熊猫 阅读(15) 评论(0) 推荐(0)
摘要: https://fortune.com/education/articles/top-cybersecurity-companies/ The top 5 cybersecurity companies in the United States The global average cost of 阅读全文
posted @ 2024-10-09 05:22 功夫 熊猫 阅读(44) 评论(0) 推荐(0)
摘要: https://serverfault.com/questions/283269/configure-static-ipv6-on-ubuntu Configure static IPv6 on Ubuntu Ask Question Asked 13 years, 3 months ago Mod 阅读全文
posted @ 2024-09-25 04:11 功夫 熊猫 阅读(31) 评论(0) 推荐(0)
摘要: https://gcore.com/learning/configure-ipv6-address-ubuntu/ How to Configure an IPv6 Address in Ubuntu December 18, 20233 min read Configuring an IPv6 a 阅读全文
posted @ 2024-09-25 04:10 功夫 熊猫 阅读(83) 评论(0) 推荐(0)
摘要: https://terenbro.com/blog/11-large-companies-that-use-java What is Java? Why do Companies Use Java? 11 Companies That Use Java Overview List of Compan 阅读全文
posted @ 2024-08-23 04:55 功夫 熊猫 阅读(18) 评论(0) 推荐(0)
摘要: https://medium.com/@marijnscholtens/aws-certified-devops-engineer-professional-vs-aws-certified-solutions-architect-professional-008719bbe496 AWS Cert 阅读全文
posted @ 2024-08-07 06:13 功夫 熊猫 阅读(46) 评论(0) 推荐(0)
摘要: https://www.linkedin.com/pulse/navigating-kubernetes-certification-ckad-vs-cka-cks-including-am3ze/ Navigating Kubernetes Certification: CKAD vs. CKA 阅读全文
posted @ 2024-07-30 09:15 功夫 熊猫 阅读(173) 评论(0) 推荐(0)
摘要: https://stackoverflow.com/questions/16761227/how-to-make-intellij-idea-insert-a-new-line-at-every-end-of-file How to make IntelliJ IDEA insert a new l 阅读全文
posted @ 2024-07-19 04:29 功夫 熊猫 阅读(79) 评论(0) 推荐(0)
摘要: https://stackoverflow.com/questions/2765421/how-do-i-push-a-new-local-branch-to-a-remote-git-repository-and-track-it-too 5620 How do I: Create a local 阅读全文
posted @ 2024-02-16 02:19 功夫 熊猫 阅读(36) 评论(0) 推荐(0)
点击右上角即可分享
微信分享提示