Admin hints: Difference between revisions

From Lolly's Wiki
Jump to navigationJump to search
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:
==DNS==
==DNS==
===Get your IP address===
===Get your IP address===
<source lang=shell-session>
<syntaxhighlight lang=bash>
$ dig +short +time=2 +tries=1 myip.opendns.com @resolver1.opendns.com
$ dig +short +time=2 +tries=1 myip.opendns.com @resolver1.opendns.com
</source>
</syntaxhighlight>
 
==Remove empty and comment lines==
<syntaxhighlight lang=bash>
$ grep -Ev "^(\s*|(//|[;#]).*)$" <file>
</syntaxhighlight>

Latest revision as of 09:34, 12 July 2024


Cheat sheets

DNS

Get your IP address

$ dig +short +time=2 +tries=1 myip.opendns.com @resolver1.opendns.com

Remove empty and comment lines

$ grep -Ev "^(\s*|(//|[;#]).*)$" <file>