linux:console:tips-and-tricks
Inhaltsverzeichnis
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}"
http://www.cyberciti.biz/faq/how-to-find-my-public-ip-address-from-command-line-on-a-linux/
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