开发者

find prune not working

开发者 https://www.devze.com 2022-12-22 22:35 出处:网络
I am trying to find all ruby files in the project. However I want to ignore all the files residing under directory vendor.

I am trying to find all ruby files in the project. However I want to ignore all the files residing under directory vendor.

find . -name .vendor -prune -o -name '*.rb' -pri开发者_如何学Pythonnt

Above command is not working. Anyone knows the fix?


Try:

find . -name '*.rb' ! -wholename "./vendor/*" -print

You may have to escape ! (i.e. write \!) character depending on your shell.

0

精彩评论

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