Question: (1) (4 pts) If vi program crashed last time and left a swap file.sample.txt.swp, give the complete command line to recover from this swap file;

(1) (4 pts) If vi program crashed last time and left a swap file.sample.txt.swp, give the complete command line to recover from this swap file; (2) (10 pts) Give the complete command line to open a text file and position the cursor at the first occurrence of phone numbers in the format of xxx-xxx-xxxx (x is a digit character). Type some text with a random phone number in a text file and try the option to figure out the correct answer; (3) (1 pt) How do you switch to command mode in vi? (4) (2 pts) List two ways you switch to insert mode in vi. (5) (2 pts) Which letter do you press for copy operation in vi? Which letter do you press for paste operation in vi? (6) (3 pts) Give the complete command in vi to search for word 'jpg' (from current location towards the end of the file). How do you repeat the search towards the end of the file? 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
