Daniels Lab Wiki

It is worth noting that.




Linux Console Tips & Tricks

Determining the public ip address

dig +short myip.opendns.com @resolver1.opendns.com
# or
dig TXT +short o-o.myaddr.l.google.com @ns1.google.com

Store it in a shell variable

myip="$(dig +short myip.opendns.com @resolver1.opendns.com)"
echo "My WAN/Public IP address: ${myip}"


vim editor

vim cheat sheet http://vim.rtorr.com/

I - start editing in Insert mode
R - start editing in Overwrite mode
Esc - Leave editing
: - Goto Command mode
yy - Copy (yank) a lines into buffer
dd - Cut a lines into buffer
P - Insert buffer into current position

In command mode (:)

/ - Search
w - write file
q - quit VI
q! - quit VI discarding the changes made

linux/console/tips-and-tricks.txt · Zuletzt geändert: 2016/04/17 15:06 von daniel

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki