LINUX Note-grep command

Source: Internet
Author: User

grep [-ACINV] [--color=auto] ' Find string ' filename

Its common parameters are as follows:

  1. -A: Find data in a binary file as a text file
  2. -C: Calculate the number of times to find ' find string '
  3. -I: Ignore case differences, that is, case is considered the same
  4. -V: Reverse selection, which shows the line without the ' Find string ' content
  5. For example
  6. # Remove the line containing Manpath in the file/etc/man.config and add color to the Found keyword
  7. grep--color=auto ' MANPATH '/etc/man.config
  8. # put the output of ls-l with the letter file (case-insensitive) content output
  9. Ls-l | Grep-i file

LINUX Note-grep command

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.