Last active
April 8, 2021 04:52
-
-
Save TerryFunggg/71a23e8e5d44ec188f4bc18fd09df8d0 to your computer and use it in GitHub Desktop.
Find specific text by given directory in linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -Ril "text-want-to-find" <directory> | |
# -i for ignore case | |
# -R for recursive | |
# -l for show the file name | |
# Example: | |
# In my case, I forgot the location of my mirrors config | |
# but I remember what mirrors i used | |
grep -Ril "aliyun" /etc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment