I’m using bash shell. I have this command to delete all JAR files within a particular directory
find ~/.jenkins/jobs/subco/ -name '*.jar' -print0 | xargs -0 -r rm
However, I want to modify the above so that it will delete all JAR files except those within the “~/.jenkins/jobs/subco/myapp”. How do I modify the above command to exclude removing JAR files from that specific directory while removing from all others?