Question: Unix Question 1 (10 points) Write the keystrokes needed for the commands in vi if the editor is currently in Command mode. a. Delete 4

Unix

Question 1 (10 points) Write the keystrokes needed for the commands in vi if the editor is currently in "Command" mode. a. Delete 4 lines, starting from the current line. b. Search "dog" or "Dog" in the entire document c. Delete 6 characters, starting from the current position d. Switch to "insert" mode. e. Undo the most recent command. Question 2 (10 points) Briefly explain what the given command would do in vi if the editor is currently in command mode. (Hint: Go try these commands and verify what they do). a. :wq! b. :%s/dog/Dog/g c. 2fa d. yy (Hint: after doing this, go elsewhere in the file and do the command p) e. gg Question 3 (10 points) Write the keystrokes needed for these commands in editor emacs. Assume that you want to accomplish each task with as few keystrokes as possible. a. Search backward b. Cut text from the "mark" to the current position c. Move to the end of the line d. Move forward one page e. Save buffered text to currently specified file Question 4 (10 points) Briefly explain what each of the given commands would do in editor emacs. Note that the ^ symbol in these commands represents the Control key. a. ^x u b. ^b c. ^y d. ^x ^c e. ^s Question 5 (10 points) For questions a and b, write out two different ways (using numerical and letter methods) to change the permissions of the file "thing.txt" to the permissions specified. a. User has read, execute permissions, group has read permissions, other has write and execute permissions b. User has no permissions, group has read write execute permissions, other has write permissions c. What are the default permissions of a newly created text file? d. What are the default permissions of a newly created directory? WHY does it differ from the permissions of a new text file? Name one command that would not produce the desired result when a directory that is not executable is used as a parameter to the command.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!