Common Linux commands

Source: Internet
Author: User

// Search for files containing the main character in the current directory and subdirectory

Grep "Main"./-R

Grep-IPattern files : Search case-insensitive. Case Sensitive by default,

Grep-lPattern files: Only list matching file names,

Grep-lPattern files: List unmatched file names,

Grep-WPattern files: Only match the entire word, not a part of the string(For example, match 'Magic 'instead of 'magical '),

Grep-CNumber pattern files: The matching context displays [number] rows respectively,

GrepPattern1|Pattern2 files: Show matchingPattern1OrPattern2,

GrepPattern1 files| GrepPattern2: Show matching
Pattern1Match againPattern2.



// Search for files whose names contain xvim characters, including the current and subdirectories.

Find. | grep "xvim"


Show only the current directory

Ls-D .*/


Related Article

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: 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.