Question: 8. The command :r somefile [assume the file is created] a. Will read in the contents of somefile into the vi editor b. Will issue

8. The command :r somefile [assume the file is created]

a. Will read in the contents of somefile into the vi editor

b. Will issue a redo to the file so that all changes are not lost

c. Will produce an error message in vi

d. Will close vi and open a file in read-only mode (so you don't lose changes)

e.Change the current cursor position to the letter 'r'

9. You have a file called somefile and you just opened it using vi. After typing G and :1 where is your cursor sitting (what line #)?

a. This will produce and error in vi

b. Line #1

c. The last line in file [if there are 100 lines it would be on line #100]

d. Exactly in the middle of the file.

e. Exactly in the center of the first line.

10. You just opened a file in vi and you want to search for a particular string called "printf". What can you type in vi to search for this string?

a. /printf

b. edit printf

c. dd printf

d. ss "printf"

e. search/"printf"

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!