Find all non “.java” files but not in .svn directories

August 19, 2010 by Michael

I’m migrating some old projects to Maven and i need to move all resources out of the source tree.

find . -type d -name '\.svn' -prune -o -type f -not -iname "*.java" -print
  • Prune every directory named ‘.svn’
  • Or
  • Type is file and the name ends not with “*.java”

I tried to create the necessary directories within the same command but after about half an hour xargs trial and error, i’ll do it manually, the list of files is small enough 😉

No comments yet

Post a Comment

Your email is never published nor shared. Required fields are marked *