Please, I need to find all certificate files in any directory in the centos box.
I tried the "find" with "exec" command and grep "not after". This display only the expiry dates of the certificates but I need to find the actual files too:
find /etc/ -type f -exec openssl x509 -in {} -noout -text ; |
grep -i "not after"
what command could list the cert files with the content of their expiry dates too?
2
Answers
You may use this
find + awk
:A version with a helper-script:
cat /root/expiry.sh
Execute like so: