Find whether a character is found in the txt file in the directory

Updated on technology 2024-02-24
10 answers
  1. Anonymous users2024-02-06

    Take win7 as an example:

    1. First of all, open a folder in the computer, and you need to find the file containing a certain character in it.

    <>3. Enter the characters you need to view, such as "51", and the page will automatically identify the file containing the 51-character cavity calendar without clicking on the enter.

    4. Another example is to enter ". .com", which will also display all files containing that character in the window.

  2. Anonymous users2024-02-05

    Looks for the file name given a string, for example, finds all files in the current directory that contain a string"linux", you can run the following command: egrep linux*

    For example, there is also Linux in testfile and testfile1, and the search result is as follows:

    egrep linux * Finds files in the current directory that contain the string "linux".

    testfile:hello linux!

    testfile:linux is a free unix-type operating system.

    testfile:linux.

    testfile1:hellinux!

    testfile1:this a linux testfile!

  3. Anonymous users2024-02-04

    Command: grep [option parameter] "The content string to find.""path-r: Recursively look up subdirectories.

    l: Only the file name is displayed.

    : The current directory path.

    root@-xl pythontest]# grep -rl "python" ./

    If you don't think it's good enough, replace the path before the file name.

    root@-xl pythontest]# grep -rl "python" ./ |sed "s;./;;g"

  4. Anonymous users2024-02-03

    Knock grep directly"Your content" -r .There is a dot at the end for the current directory, you can also add an absolute path).

  5. Anonymous users2024-02-02

    It's simple, one command. For example, if you want to find all the files under home that contain .a All files, terminal input:

    # find /home -name *.a* terminals will be displayed

    Remember that there are some folders that only the root user has permission, so sudo $sudo find home -name *a* Seek to adopt, use it yourself, 100% correct

  6. Anonymous users2024-02-01

    Take win7 as an example:

    1. First of all, open a folder in your computer, and you need to find a file containing a certain character in it.

    3. Enter the characters you want to view, for example, enter "51", and the file containing 51 characters will be automatically recognized without clicking Enter.

    4. Another example is to enter ". .com", which will also display all files containing that character in the window.

  7. Anonymous users2024-01-31

    First of all, click on it with the red circle, otherwise you won't be able to find it, and then.

  8. Anonymous users2024-01-30

    Open "My Computer" and click "Search" (as shown in the icon below the menu "View", click "Find here" and select "Browse", the system will pop up a box asking you to select another folder, after selection, and finally enter the character you are looking for in "A word or phrase in the file" and "Search".

  9. Anonymous users2024-01-29

    You can only search for the file name, but not the content of the document, just open my computer, and enter what you want to search in the upper right corner.

  10. Anonymous users2024-01-28

    Texter tools, such as sublime, go to Ctrl+Shift+F to search the entire directory, and on the left are all the files in your current directory, *Representing all file names in all formats, you can also set them up, such as finding txt files.

    Process: Find out whether all files in the directory contain a certain string, and print only the file name find.|xargs grep-ri"ibm"-l

    1.Regular expression.

    1) Regular expressions are generally used to describe the special use of text patterns, which are composed of ordinary characters (such as characters a-z) and special characters (called metacharacters, such as , *, etc.). and (2) the basic metacharacter set and its meaning.

    Only the first line is matched. For example, a matches the line that starts with aabc, a2e, a12, aaa, .,

    Only the end of the line is matched. For example, a matches the line that ends in a, bca, 12a, aaa, .,

    Match 0 or more of this single character. For example, (a)* matches empty, a, aa, aaa, ., .,

    Only inner characters are matched. It can be a single character or a sequence of characters","Separate the different strings that you want to match. - can also be used to indicate the range of inner character sequences, e.g. [1-5] for [12345].

    It is used to mask the special meaning of only one metacharacter. Such as *,',\",\|Wait.

    dot) matches only any single character. pattern: It is used only to match the number of times the previous pattern appears.

    n is the number of times. If a matches: the meaning is the same as above, but the minimum number of times is n

    Such as a match aa, aaa, aaaa, ., .,pattern: The meaning is the same as above, but the number is between n and m.

    For example, a matches aa, aaa, aaaa.

    3) Give examples:

    Match blank lines. Hope it helps.

Related questions
9 answers2024-02-24

If your html name is as regular as you say, you can write it smartly. >>>More

6 answers2024-02-24

I tried going downstairs with no problem. If it can't be opened, the landlord can try this sentence: (note that it is 3 quotation marks). >>>More

11 answers2024-02-24

textreader reader;

int linecount = 0; >>>More

8 answers2024-02-24

Without the slip 101 template, you can't write it well according to the content structure of the document. It's better to paste the back part of the original text in its entirety. >>>More

13 answers2024-02-24

Then take out the card, try it with a card reader, or update your phone's system.