Difference between revisions of "Linux cli snippets"

From DevOps Notebook
(Created page with "== Linux command line snippets == === Get website SSL certificate details using CLI === <pre> $ echo | openssl s_client -showcerts -servername sendfileto.net -connect sendfil...")
 
Line 5: Line 5:
 
$ echo | openssl s_client -showcerts -servername sendfileto.net -connect sendfileto.net:443 2>/dev/null | openssl x509 -inform pem -noout -text
 
$ echo | openssl s_client -showcerts -servername sendfileto.net -connect sendfileto.net:443 2>/dev/null | openssl x509 -inform pem -noout -text
 
</pre>
 
</pre>
 +
 +
=== Temporary stop bash history ===
 +
Turn off:
 +
<pre>
 +
$ set +o history
 +
</pre>
 +
Turn on:
 +
<pre>
 +
$ set -o history
 +
</pre>
 +
Alternative is to add HISTCONTROL="ignorespace" into .bashrc file and all things <br>
 +
written with space in front wont be recorded in history

Revision as of 23:21, 10 April 2020

Linux command line snippets

Get website SSL certificate details using CLI

$ echo | openssl s_client -showcerts -servername sendfileto.net -connect sendfileto.net:443 2>/dev/null | openssl x509 -inform pem -noout -text

Temporary stop bash history

Turn off:

$ set +o history

Turn on:

$ set -o history

Alternative is to add HISTCONTROL="ignorespace" into .bashrc file and all things
written with space in front wont be recorded in history