Investigate the vi editor. Briefly answer questions 3 to 7 (You can type the ans
ID: 3907575 • Letter: I
Question
Investigate the vi editor. Briefly answer questions 3 to 7 (You can type the answers of questions 3-15 in student-first-name_student-number lab2.docx): 3. Describe 8 different ways to move the cursor around in a file (e.g. h to move left one character). Describe 3 different ways to save a file. 5. If vi is in command mode, what do the following keys do? | Describe how you would have vi move the cursor to the first occurrence of KPU in a text file. 7. 1 How do you ensure that all ordinary files and directory created by you have rw-rw-r- and rwxrwxr-x as the default permission, respectively?Explanation / Answer
The answer to the 3rd question:
Moving to Start or End of Line:
Press ^ to move the cursor to the start of the current line.
Press $ to move the cursor to the end of the current line.
Moving Down One Line:
Press the Return key to move the cursor to the beginning of the next line down.
Moving Left:
Press the BackSpace key to move the cursor one character to the left.
Moving Right:
Press the Space Bar to move the cursor one character to the right.
Moving to the Top :
Press H (“high”) to move the cursor to the top of the screen.
Moving to the Middle :
Press M (“middle”) to move the cursor to the middle of the screen.
Moving to the Bottom:
Press L (“low”) to move the cursor to the bottom of the screen.
The answer to the 4th question:
1. To just save file and not to exit to shell prompt, press [Esc] key and type w
2. To exit from vi saving changes, press [Esc], : (colon) and type wq:
The answer to the 5th question:
O - open line above and enter insertion mode
A - enter insertion mode after the end of a line
J - join current line with next line
G - goto line number prefixed, or go to end if none
o - open line below and enter insertion modeRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.