This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
lx103:notes [2024/04/29 06:03] 114.119.141.71 old revision restored (2023/11/21 17:05) |
lx103:notes [2024/05/15 02:44] (current) 114.119.141.71 old revision restored (2024/01/04 10:55) |
||
---|---|---|---|
Line 451: | Line 451: | ||
* find /etc -name motd | * find /etc -name motd | ||
* search in /etc for files containing motd. | * search in /etc for files containing motd. | ||
+ | |||
+ | ====== VIM / VI Text Editor ====== | ||
+ | Light, installed on most machines. | ||
+ | |||
+ | *CMD MODE | ||
+ | * hjkl, move L R U D | ||
+ | * 0, SHIFT+0 - move to beginning or END of line. | ||
+ | * L - Move to last line of TERMINAL, not DOC | ||
+ | * H - move me to top of term. | ||
+ | * G - move to last line in file | ||
+ | * 1G - moves to first line of file. | ||
+ | * 40G - goto line 40 | ||
+ | * :40 - also goto line 40 | ||
+ | * yy - yank/cp line | ||
+ | * p - paste | ||
+ | * P - paste on line before the cursor | ||
+ | * u - undo | ||
+ | * 5yy - yank 5 lines | ||
+ | * / - search for text | ||
+ | * n - continue forward in search | ||
+ | * N - go backwards in search | ||
+ | * dd - cut line | ||
+ | * 5dd - cut 5 lines | ||
+ | * ? - search | ||
+ | * cc = del line + goto insert mode | ||
+ | * cw = change word, deletes word and puts you in INSERT mode! Awesome! | ||
+ | * | ||
+ | * EX MODE | ||
+ | * : | ||
+ | * %s/ | ||
+ | * %s/ | ||
+ | * :q! - quit | ||
+ | * :wq - write quit | ||
+ | * :w - write | ||
+ | * :r path/ | ||
+ | * : | ||
+ | |||
+ | |||
+ | ====== sed Stream Editor ====== | ||
+ | |||
+ | *change first occurrence of parttime to promotion. | ||
+ | * sed ' | ||
+ | * change first occur of parttime to fulltime | ||
+ | * sed ' | ||
+ | * change ALL occurrences of parttime to fulltime | ||
+ | * sed ' | ||
+ | Can move all space to dots, slashes to spaces, etc etc, powerful stuff. | ||
+ | RESUME ME, LINUX ACAD VIDEO @4:30m - LEcture, sed Stream Editor! |