原文鏈接:https://blog.csdn.net/iamlihongwei/article/details/70139950
可以使用windows自帶的findstr.exe來實現。
findstr.exe /s /i "string" *.*
上面的命令表示,當前目錄以及當前目錄的所有子目錄下的所有文件中查找"string"這個字符串。
*.*表示所有類型的文件。
/s 表示當前目錄以及所有子目錄
/i 表示不區分大小寫
可以參考help findstr的輸出解釋來使用此命令。
c:\Windows\System32\findstr.exe /s /i "jsonp" *.jsp*
查找當前目錄及子目錄下的jsp文件中包含jsonp字符串的文件
注意:
findstr.exe一般在C:\Windows\System32目錄下,要從任意路徑調用該命令,需要將C:\Windows\System32添加到path環境變量中