开发者

find prune not working

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜