Wednesday, January 5, 2022

Add the pem certificate to linux

Add the ca-certificate to access the site.

1# Extract pem files 2unzip cert-cas.zip 3cd cert-cas 4 5# convert all pem files to crt 6for f in *; do mv -- "$f" "${f%.pem}.crt"; done 7 8sudo mkdir /usr/local/share/ca-certificates/extra 9sudo cp *.crt /usr/local/share/ca-certificates/extra/root.cert.crt 10sudo update-ca-certificates

certificates will be available ( below shows confirmation )

1test@testM1:/usr/local/share/ca-certificates/extra$ sudo update-ca-certificates 2Updating certificates in /etc/ssl/certs... 3rehash: warning: skipping duplicate certificate in cert-cas.pem 43 added, 0 removed; done. 5Running hooks in /etc/ca-certificates/update.d... 6 7Adding debian:test.com-cachain.pem 8Adding debian:test.com-rootca.pem 9Adding debian:test.com-subca.pem 10done. 11done. 12

Find files in dir not contain a string



 find . -iname "*.md" -exec grep -Li "All rights reserved" {} \+