The grep usage of Linux

Source: Internet
Author: User

Application scenarios: Looking in the current directory, such as the code directory, does not need to be found in the. SVN directory, as well as in the ctags generated tags file:

The--exclude-dir= parameter of grep is to exclude a directory, that is, the directory after the equals sign;

The--exclude= parameter of grep is to exclude a specific file, that is, a file that does not contain an equal sign;

  Grep-nr--exclude= "tags"--exclude-dir= ". SVN" "vmoffnetwork" *

Once and for all, add the/ROOT/.BASHRC inside:

Export grep_options= "--exclude=tags--exclude-dir=\.svn"

[Email protected]# SOURCE/ROOT/.BASHRC

You can use grep to automatically bring the re-election item;

The grep usage of Linux

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.