I want to detect all nested wars and jars containing the log4j library. I have jboss/wildfly services. I started to find out with 'locate | grep', but it shows me only tmp directories, not exactly war/jar files, for example : wildfly-8.0.1.Final/standalone/tmp/vfs/deployment/deployment**.jar
But I want to detect war/jar files.
Does anyone have a solution for that?
find /opt/wildfly1/ ! -type d -name *.jar -exec sh -c 'printf "\n\nFile: {} /n"; unzip -l {}' ";" | grep -v tmp | egrep 'nArchive|log4j'
find /opt/wildfly1/ ! -type d -name *.war -exec sh -c 'printf "\n\nFile: {} /n"; unzip -l {}' ";" | grep -v tmp | egrep 'war|log4j'
– grU Dec 22 '21 at 14:22