问题:
I need to do a recursive grep in Windows, something like this in Unix/Linux: 我需要在Windows中做一个递归grep,在Unix / Linux中是这样的:
grep -i 'string' `find . -print`
or the more-preferred method: 或者更优选的方法:
find . -print | xargs grep -i 'string'
I'm stuck with just cmd.exe, so I only have Windows built-in commands. 我只是坚持使用cmd.exe,所以我只有Windows内置命令。 I can't install Cygwin , or any 3rd party tools like UnxUtils on this server unfortunately. 我不能在这台服务器上安装Cygwin或任何第三方工具,如UnxUtils 。 I'm not even sure I can install PowerShell. 我甚至不确定我是否可以安装PowerShell。 Any suggestions using only cmd.exe built-ins (Windows 2003 Server)? 任何建议只使用cmd.exe内置插件(Windows 2003 Server)?
解决方案:
参考一: https://en.stackoom.com/question/2vag参考二: https://stackoom.com/question/2vag