用于搜索多种文件类型的 Unix find 命令的 Windows 等效项

编程入门 行业动态 更新时间:2024-10-26 03:29:12
本文介绍了用于搜索多种文件类型的 Unix find 命令的 Windows 等效项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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

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

更多推荐

用于搜索多种文件类型的 Unix find 命令的 Windows 等效项

本文发布于:2023-10-07 15:40:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1469801.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件类型   多种   命令   Unix   find

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!