Rob's *nix Commands Cheat Sheet
by Rob Jacques (robbyrob42) via cheatography.com/47794/cs/13631/
VIM Cursor Movement Handy posix Commands (macos mostly)
first, last char of line ^, $ IP Range ipcalc 192.168.0.1/24
Calculator
move to column n of line n/
Show env
move forward/backward to character x fx, Fx
Environment
move forward to before char x tx Variables
next/previous paragraph, next/previous sentance {}, () show a single echo $VARIABLE
variable
word/token left, right bw
add or update export VARIABLE="value"
Move to end/beginning of file G, gg variable value
View shasum -a 256 file.dmg
Vim Editing Checksum
insert left of current char/current line iI list packages sudo apt list --installed | grep -i
apache sudo dpkg -l | grep -i apache
insert to right of current char/current line aA
check linux lsb_release -a
create new line under/above current one oO
version
and insert
delete text moved over by {motion} and c{motion}
Vundle (Vim Plugin Manager)
enter insert mode
delete text moved over by {motion} and do d{motion] Update Plugins from .vimrc :VundleUpdate
not enter insert mode
copy the text moved over by {motion} y{motion} Administration
visual selection mode v Adding users https://askubuntu.com/questions/7023
6/how-can-i-create-an-
Linewise selection mode V administrator-user-from-the-
Blockwise Selection mode <C-V> command-line
Adding Users (s is shell, g useradd UserName -s
Cut, copy, cut (& leave in insert mode) d, y, c
is group, m creates home /bin/bash -G sudo -m
If you want to search an entire file, you can :%s/search/replace/g
dir if not already
use % to indicate that as the range: Vim Search and replace
created)
cURL Commands
Download File curl -o output.file This works
from a remote http://server1.cyberciti.biz with a
server /file.tar.gz` webpage
too...
Download File curl -O
from remote http://server1.cyberciti.biz/file.tar.gz`
server 2
By Rob Jacques (robbyrob42) Not published yet. Sponsored by CrosswordCheats.com
cheatography.com/robbyrob42/ Last updated 28th April, 2018. Learn to solve cryptic crosswords!
www.roblo.org Page 1 of 1. http://crosswordcheats.com