Access Millions of academic & study documents

Itst 1136 Lesson 10 Editing Files Web 1

Content type
User Generated
Subject
Computer Science
School
Columbus State Community College
Type
Homework
Showing Page:
1/5
Lesson 10 Lab – Editing Files Name: ____________________________________________
1
General Instructions
- Follow all of the instructions exactly and answer the questions along the way.
- Perform only the tasks that are indicated. Doing anything more or anything less may cause
subsequent answers to be incorrect.
- Submit this lab to the appropriate area on Blackboard when you are done.
- If a question asks you what command you typed, provide the command exactly as you entered it in
the terminal window.
- If you are prompted to type an underlined expression into a text file, type exactly that expression,
including capitalization, punctuation, spacing, etc.
- Record your answers in a different color font. Upload in a .docx or .doc format
Section 1
In this section, you’ll learn how to do the following things in vi:
o create a new file or open an existing one
o insert text using the i key
o undo actions with the u and U keys
o append text with the a key
o save and quit.
1. Open a terminal window on your Pi and navigate to your home directory.
2. Type the following into the terminal and press Enter: mkdir ITST_1136_Lab_10
3. Navigate into the directory you just created.
4. Type the following into the terminal and press Enter: vi stuff.txt
This command opens stuff.txt in the vi editor. You should see a cursor, a bunch of stacked tildes
(~) underneath it, and at the bottom of the terminal you should see “stuff.txt” [New File].
The tildes represent empty lines (lines with nothing on them, not even whitespace).
5. Press the lowercase i key. Nothing should look different on the screen yet, but this is an absolutely
necessary and critical step you just did.
6. Type the following expression: Hello!
7. Look closely at what you just typed and hit the Esc key. What happened?
The –INSERT—at the bottom left corner of the screen went off, then 1,6 All replaced it at the
bottom right corner
8. Press the lowercase i key and type the following expression: This is line 1, correct?
9. What exactly does the full line of text say now?

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/5
Lesson 10 Lab – Editing Files Name: ____________________________________________
2
HelloThis is line 1, correct?!
10. If done correctly so far, the text displaying on the screen will not be what we intended.
Press the Esc key.
11. Press the lowercase u key. What happened?
It removed the newly typed word and showed the previous “Hello!”
12. Look closely at the text displaying near the top and press the lowercase a key. What happened?
It created a space
13. Type the following expression (notice the blank space before the “S”): So, is this line 1?
14. Press the Esc key. What does the text file say now?
Hello! So, it this line 1?
15. Press the uppercase U key. What happened?
Everything cleaned off
16. Type a colon character followed by a lowercase q. :q
Press Enter. What happened?
It showed, E37: No write since last change (add ! to override)
17. It looks like vi is forcing you to save your work. At this point you have three options:
a. Type :q! and press Enter. This will quit without saving anything.
b. Type :w and press Enter to save, then type :q and press Enter to quit.
c. Type :wq and press Enter to save and quit using only one command.

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/5

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 5 pages?
Access Now
Unformatted Attachment Preview
Lesson 10 Lab – Editing Files Name: ____________________________________________ General Instructions - Follow all of the instructions exactly and answer the questions along the way. Perform only the tasks that are indicated. Doing anything more or anything less may cause subsequent answers to be incorrect. Submit this lab to the appropriate area on Blackboard when you are done. If a question asks you what command you typed, provide the command exactly as you entered it in the terminal window. If you are prompted to type an underlined expression into a text file, type exactly that expression, including capitalization, punctuation, spacing, etc. Record your answers in a different color font. Upload in a .docx or .doc format Section 1 In this section, you’ll learn how to do the following things in vi: o create a new file or open an existing one o insert text using the i key o undo actions with the u and U keys o append text with the a key o save and quit. 1. Open a terminal window on your Pi and navigate to your home directory. 2. Type the following into the terminal and press Enter: mkdir ITST_1136_Lab_10 3. Navigate into the directory you just created. 4. Type the following into the terminal and press Enter: vi stuff.txt This command opens stuff.txt in the vi editor. You should see a cursor, a bunch of stacked tildes (~) underneath it, and at the bottom of the terminal you should see “stuff.txt” [New File]. The tildes represent empty lines (lines with nothing on t ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Studypool
4.7
Indeed
4.5
Sitejabber
4.4