Term
vi editor, what is last line mode |
|
Definition
when you hit : and type a command |
|
|
Term
vi command mode, what do you hit to insert text |
|
Definition
|
|
Term
vi command mode, what do you hit to insert text at the beginning of the line |
|
Definition
|
|
Term
vi command to open a new line below the current line |
|
Definition
|
|
Term
vi command to open a new line above the current line and go into insert mode |
|
Definition
|
|
Term
vi command to move to the end of the current line |
|
Definition
|
|
Term
vi command, move to the beginning of the current line |
|
Definition
|
|
Term
vi command, move to the middle of the page |
|
Definition
|
|
Term
|
Definition
ctrl+f (forward) , or page down |
|
|
Term
vi command, move down half of a page |
|
Definition
|
|
Term
|
Definition
ctrl+b (back), or page up |
|
|
Term
vi command, move one half page up |
|
Definition
|
|
Term
vi command, move to the last line of the file |
|
Definition
|
|
Term
vi command, show the line number |
|
Definition
|
|
Term
|
Definition
|
|
Term
vi command, delete a line |
|
Definition
|
|
Term
vi command, move to the first line of the file |
|
Definition
|
|
Term
vi command, delete a character at the cursor position |
|
Definition
|
|
Term
vi command, delete a character before the cursor position |
|
Definition
|
|
Term
vi command, delete lines 6 through 12 |
|
Definition
|
|
Term
vi command, undo the last command |
|
Definition
|
|
Term
vi command, undo all the changes on the current line |
|
Definition
|
|
Term
vi, undo the previous last line command |
|
Definition
|
|
Term
vi, repeat the last line command you just did |
|
Definition
|
|
Term
vi, you have undone, no redo what you have undone |
|
Definition
|
|
Term
vi, search forwards for a string |
|
Definition
|
|
Term
vi, search backwards for a string |
|
Definition
|
|
Term
vi, you've searched, now find the next occurrence |
|
Definition
|
|
Term
vi, you've searched, find the previous occurence |
|
Definition
|
|
Term
vi, find and repleace "old" with "new" |
|
Definition
:%s/old/new -works with the first occurrence |
|
|
Term
vi, find and replace all "old"s with "new"s |
|
Definition
|
|
Term
vi, yank the current letter |
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
|
|
Term
vi, yank the current sentence |
|
Definition
|
|
Term
vi, yank the previous 3 sentences |
|
Definition
|
|
Term
vi, yank the current paragraph |
|
Definition
|
|
Term
vi, yank the previous paragraph |
|
Definition
|
|
Term
vi, paste the yanked data to the current line |
|
Definition
|
|
Term
vi, paste the yanked data to the previous line |
|
Definition
|
|
Term
vi, Copy lines 1 through 3 and paste them after line 5 |
|
Definition
|
|
Term
vi, move lines 4 through 6 to after line 8 |
|
Definition
|
|
Term
vi, delete to the end of the current word and go into insert mode |
|
Definition
|
|
Term
vi, delete the current character and go into insert mode |
|
Definition
|
|
Term
vi command, change the case of the letter |
|
Definition
|
|
Term
vi command, join the current line with the line below it |
|
Definition
|
|
Term
vi command, delete from the cursor to the end of the paragraph, and go into insert mode |
|
Definition
c} - change to the end of the paragraph |
|
|
Term
vi command, delete from the cursor to the end of the previous paragraph, then go into insert mode |
|
Definition
c{ change to the beginning of the paragraph |
|
|
Term
vi command, delete from the cursor to the end of the sentence, go into insert mode |
|
Definition
c) change to the end of the sentence |
|
|
Term
vi command, delete from the cursor to the beginning of the previous sentence, go into insert mode |
|
Definition
c( change the previous sentence and it also removes any of the sentence you are in |
|
|
Term
vi command, switch characters with the character on the right |
|
Definition
|
|
Term
vi, insert file2 below the current line |
|
Definition
|
|
Term
vi, turn on the line numbers |
|
Definition
|
|
Term
vi, turn off showing line numbers |
|
Definition
|
|
Term
vi, set ignore case when searching |
|
Definition
|
|
Term
vi, turn off ignore case for searches |
|
Definition
|
|
Term
vi, display invisible characters |
|
Definition
|
|
Term
vi, turn off showing invisible characters |
|
Definition
|
|
Term
vi, show the current mode of operation |
|
Definition
|
|
Term
vi, turn off showing the current mode of operation |
|
Definition
|
|
Term
vi, display all the vi settings |
|
Definition
|
|
Term
vi, display the settings (the variable settings) and the current settings |
|
Definition
|
|
Term
|
Definition
|
|
Term
vi, write the changes into file3 |
|
Definition
|
|
Term
vi, force write the changes into a file |
|
Definition
|
|
Term
|
Definition
|
|
Term
vi, quit vi without saving the changes |
|
Definition
|
|
Term
vi, exit vi temporarily, then go back into vi |
|
Definition
:sh - go to a shell, ctrl+d to return |
|
|
Term
vi, execute a command without exiting vi |
|
Definition
|
|
Term
vi command, change from the current cursor position to the end of the line |
|
Definition
|
|
Term
awk, Use file ll.out, show columns 9, 5, and 3, put spaces between the columns. |
|
Definition
awk '{print $9, $5, $3}' ll.out |
|
|
Term
|
Definition
Works on columns. Reads the lines, each field can be referenced as $1, $2, etc. |
|
|
Term
|
Definition
all the fields, $0 means the whole line |
|
|
Term
awk, use file ll.out, add text between fields 9 and 5 |
|
Definition
awk '{print $9,"is column nine",$5}' ll.out |
|
|
Term
awk, use ll.out, print fields 3 and 5, and don't leave a space between them |
|
Definition
awk '{print $3$5}' ll.out |
|
|
Term
awk, use file ll.out, print columns 1 and 3, put a tab between them |
|
Definition
awk '{print $1"\t"$3}' ll.out |
|
|
Term
|
Definition
|
|
Term
sed, use sed on yourfile to delete a line containing a specific word |
|
Definition
sed '/yourword/d' yourfile |
|
|
Term
sed, using yourfile delete only yourword |
|
Definition
sed 's/yourword//g' yourfile |
|
|
Term
sed, delete two words from yourfile, use the -e option |
|
Definition
sed -e 's/firstword//g' -e 's/secondword//g' yourfile |
|
|
Term
sed, delete two words from yourfile, don't use the -e option |
|
Definition
sed 's/firstword//g;s/secondword//g' yourfile |
|
|
Term
sed, pipe ls -l to sed and add RHEL to the end of each line |
|
Definition
|
|
Term
sed, print only the lines from /etc/group that contain "root" |
|
Definition
sed -n '/root/p' /etc/group |
|
|
Term
sed, print /etc/group, and print lines that contain "root" twice |
|
Definition
|
|
Term
sed, print /etc/group and replace "root" with "ROOT" |
|
Definition
sed 's/root/ROOT/g' /etc/group |
|
|
Term
sed, print /etc/group and replace "root" with "ROOT" and "sys" with "SYS" |
|
Definition
sed -e 's/root/ROOT/g' -e 's/sys/SYS/g' /etc/group |
|
|