We are seeing an older version of a class being used, although we had the latest one deploy. To scan all JAR files in all subfolders of an application server, how do we writ
Something like:
find . -name '*.jar' | while read jarfile; do if jar tf "$jarfile" | grep org/jboss/Main; then echo "$jarfile"; fi; done
You can wrap that up like this:
jarscan() {
pattern=$(echo $1 | tr . /)
find . -name '*.jar' | while read jarfile; do if jar tf "$jarfile" | grep "$pattern"; then echo "$jarfile"; fi; done
}
And then jarscan org.jboss.Main will search for that class in all jar files found under the current directory