Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

At the command prompt, type ls and press Enter to view the contents of your current directory. Notice that there is now a file called

At the command prompt, type ls and press Enter to view the contents of your current directory. Notice that there is now a file called sample1 listed.
13
Next, type file sample1 and press Enter. What type of file is sample1? At the command prompt, type cat sample1 and press Enter.
14
At the command prompt, type vi sample1 and press Enter to open the letter again in the vi editor. What is displayed at the bottom of the screen? How does this compare with Step 10?
15
Use the cursor keys to navigate to the bottom of the document. Press the Shift and ; keys together to open the : prompt at the bottom of the screen again, type !date and press Enter. The current system date and time appear at the bottom of the screen. As indicated, press Enter to return to the document.
16
Press the Shift and ; keys together to open the : prompt at the bottom of the screen again, type r !date and press Enter. What happened and why?
17
Use the cursor keys to position your cursor on the line in the document that displays the current date and time, and type yy to copy it to the buffer in memory. Next, use the cursor keys to position your cursor on the first line in the document, and type P (capitalized) to paste the contents of the memory buffer above your current line. Does the original line remain at the bottom of the document?
18
Use the cursor keys to position your cursor on the line at the end of the document that displays the current date and time, and type dd to delete it.
19
Use the cursor keys to position your cursor on the t in the word there on the second line of the file that reads Hi there, I hope this day finds you well., and type dw to delete the word. Next, press i to enter insert mode, type the word Bob , and then press Esc to switch back to command mode.
20
Press the Shift and ; keys together to open the : prompt at the bottom of the screen, type w sample2 and press Enter. What happened?
21
Press i to enter insert mode, and type the word test . Next, press Esc to switch to command mode. Press the Shift and ; keys together to open the : prompt at the bottom of the screen, type q , and press Enter to quit the vi editor. Were you able to quit? Why not?
22
Press the Shift and ; keys together to open the : prompt at the bottom of the screen, type q!, and press Enter to quit the vi editor and discard any changes since the last save.
23
At the command prompt, type ls and press Enter to view the contents of your current directory. Notice it now includes a file called sample2, which was created in Step 20. Type diff sample1 sample2 and press Enter to view the difference in content between the two files you created.
24
At the command prompt, type vi sample2 and press Enter to open the letter again in the vi editor.
25
Use the cursor keys to position your cursor on the line that reads Hi Bob, I hope this day finds you well.
26
Press the Shift and ; keys together to open the : prompt at the bottom of the screen, type s/Bob/Barb/g , and press Enter to change all occurrences of Bob to Barb on the current line.
27
Press the Shift and ; keys together to open the : prompt at the bottom of the screen, type 1,$ s/to/TO/g , and press Enter to change all occurrences of the word to to TO for the entire file.
28
Press the u key. What happened?
29
Press the Shift and ; keys together to open the : prompt at the bottom of the screen, type wq , and press Enter to save your document and quit the vi editor.
30
At the command prompt, type vi sample3 and press Enter to open a new file called sample3 in the vi editor. Press i to enter insert mode. Next, type P.S. How were the flies this year? Press the Esc key when finished.
31
Press the Shift and ; keys together to open the : prompt at the bottom of the screen, type wq , and press Enter to save your document and quit the vi editor.
32
At the command prompt, type vi sample1, press Enter to open the file sample1 again, and use the cursor keys to position your cursor on the line that reads Mackenzie Elizabeth.
33
Press the Shift and ; keys together to open the : prompt at the bottom of the screen, type r sample3, and press Enter to insert the contents of the file sample3 below your current line.
34
Press the Shift and ; keys together to open the : prompt at the bottom of the screen, type s/flies/flies and bears/g and press Enter. What happened and why?
35
Press the Shift and ; keys together to open the : prompt at the bottom of the screen, type set number , and press Enter to turn on line numbering.
36
Press the Shift and ; keys together to open the : prompt at the bottom of the screen, type set nonumber , and press Enter to turn off line numbering.
37
Press the Shift and ; keys together to open the : prompt at the bottom of the screen, type set all , and press Enter to view all vi parameters. Press Enter to advance through the list, and press q when finished to return to the vi editor

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Integration Services

Authors: Brian Knight, Devin Knight

1st Edition

1118850904, 9781118850909

Students also viewed these Databases questions

Question

What is meant by formal organisation ?

Answered: 1 week ago

Question

What is meant by staff authority ?

Answered: 1 week ago

Question

Discuss the various types of policies ?

Answered: 1 week ago

Question

Briefly explain the various types of leadership ?

Answered: 1 week ago

Question

Explain the multicultural organization development (MCOD) process.

Answered: 1 week ago