Last active
January 29, 2020 19:47
-
-
Save JamesSkemp/86cc0caf64b27e1207d4eb52b317bf4f to your computer and use it in GitHub Desktop.
Use built-in Windows functionality to find a string of text in a directory.
This file contains 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
# Can only be run within a Git repository, but this will also search untracked files, as well as those that are tracked. | |
git grep --untracked '<term>' |
This file contains 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
REM From https://stackoverflow.com/a/13799990/11912 | |
findstr /s "<term>" *.item |
This file contains 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
Get-ChildItem -Recurse -Include *.item | select-string "<term>" | |
gci -r -i *.item | select-string "<term>" | |
gci -r -i *.* -exclude *.dll,*.xml | select-string "<term>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Migrated to https://cmds.jamesrskemp.com/windows.html