Windows相当于Unix find命令搜索多个文件类型 [英] Windows equivalent for Unix find command to search multiple file types

查看:640
本文介绍了Windows相当于Unix find命令搜索多个文件类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

虽然cygwin安装在windows中提供了大多数unix命令,仍然我想知道如何使用Windowsfind命令在一个命令中搜索多个文件类型。

ie:找 。 -name * .cpp -o -name * .h -o -name * .java

While having a cygwin installed in windows gives most of unix command, still i was wondering how to search multiple filetypes in one command using windows "find" command.
ie: find . -name *.cpp -o -name *.h -o -name *.java

上述命令给出了cpp,h& java,什么是等价的使用windows查找?

The above command gives me a list of all cpp, h & java, what will be the equivalent using the windows find?

推荐答案

这将找到所有文件,目录和所有子目录:

This will locate all files with the given extensions in the current working directory and all subdirectories:

dir *.cpp *.h *.java /b/s

请参阅 https ://technet.microsoft.com/en-us/library/cc755121.aspx 了解有关使用 dir 的更多信息。

See https://technet.microsoft.com/en-us/library/cc755121.aspx for more info on using dir.

这篇关于Windows相当于Unix find命令搜索多个文件类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆