开发者

Solaris find command

开发者 https://www.devze.com 2022-12-13 04:33 出处:网络
In Solaris, what is the syntax of find command to find files having multiple file name formats? Eg: In my current directory and in its sub-directories if I have files like test.log, sample.out, demo.

In Solaris, what is the syntax of find command to find files having multiple file name formats?

Eg: In my current directory and in its sub-directories if I have files like test.log, sample.out, demo.buf and some other files, how ca开发者_开发技巧n I write single find command to find these 3 files.


this is the correct one

find . \( -name "test.log" -o -name "sample.out" -o -name "demo.buf" \) -print


Same as all other Unixes:

 find . -name test.log -o -name sample.out -o name demo.buf
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号