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.
精彩评论