2013-06-18 113 views

回答

0

不知道哪個操作系統平臺要償還的,

但Linux/Unix系統可以用於此目的以下命令。

find . -name '*.ext' -type f | xargs fgrep 'pattern to be searched' 

這將搜索從當前目錄開始的文件並檢查'要搜索的模式'。可應用於帶通配符的文件名模式,我已經使用「* .EXT」

+0

哦,對不起,我真的忘了提及我的操作系統。 這是Windows 7:/ 但是,無論如何謝謝你的回答:) – user2428207

+0

好的。一個powershell選項稍微正好相反,在鏈接中提到http://stackoverflow.com/questions/14440692/windows-scripting-list-files-not-matching-a-pattern –

3
findstr /M "searched string" *.txt > matchingFiles.out 

findstr /?文檔:

/M   Prints only the filename if a file contains a match. 
相關問題