Using your username and password login into ACC Linux server (cois-linux.austinc
ID: 3803250 • Letter: U
Question
Using your username and password login into ACC Linux server (cois-linux.austincc.edu)
Create an ic8 directory under your home directory (mkdir ic8)
Change directory to ic8 to make it your present working directory (cd ic8)
Using your vim editor create filename ic8_vim.txt (Hint: vim ic8_vim.txt) and enter the text shown here, exactly. These [ ] are keystrokes; this " " needs some personalization (like, "Your Name").
[Enter] [Enter] [Enter] [Enter]
Today is a very Good day, I think. [Enter] [Enter]
And I am working on my ic8 [Enter] [Enter]
"Your Name" [Enter]
Save your file without exiting vim and continue to next steps to edit your file. What command did you use to save your file?
Using vim command move the cursor to the 4th line. What command did you use?
Using vim command delete all text before and after “Good” word so that line will show now as “Good ”. Write sequence of commands you typed in
Using vim command substitute the word “working” for the word “work”. What command did you use?
Using vim commands delete all text before and after the word “work” so that line will show now as “work”. Write sequence of commands you typed in.
Using vim commands make your vim file to look like this (personalized as whatever you wrote for “Your Name”). Write the sequence of command that you typed to accomplish this.
Good work
“Your Name”
Save file and quit vim. What command did you use?
Explanation / Answer
1) Save your file without exiting vim and continue to next steps to edit your file. What command did you use to save your file?
-> Press 'Escape' key and type :w and press [Enter]
2) Using vim command move the cursor to the 4th line. What command did you use?
-> Type 4G
3) Using vim command delete all text before and after “Good” word so that line will show now as “Good ”. Write sequence of commands you typed in
-> (Assuming that your cursor is at the end of the file) Type 7dd, this will delete 7 lines from the position where the cursor is on, and our cursor is at the end of file
Type 14X so that the text to the right side of 'Good' word gets removed.
Press h 4 times so that the cursor points before 'Good' word.
Type 16X so that the text to the right side of 'Good' word gets removed.
4) Using vim command substitute the word “working” for the word “work”. What command did you use?
-> :%s/work/working
5) Using vim commands delete all text before and after the word “work” so that line will show now as “work”. Write sequence of commands you typed in.
-> (Assuming that your cursor is at the end of the file) Type 4dd, this will delete 4 lines from the position where the cursor is on, and our cursor is at the end of file
Type 10X so that the text to the right side of 'work' word gets removed.
Press h 4 times so that the cursor points before 'work' word.
Type 9X so that the text to the right side of 'work' word gets removed.
Press 'k' one time so that the cursor now moves one line up.
Type 8dd, this will delete 8 lines from the position where the cursor is on.
6) Using vim commands make your vim file to look like this (personalized as whatever you wrote for “Your Name”). Write the sequence of command that you typed to accomplish this.
Good work
“Your Name”
-> (Assuming that your cursor is at the end of the file) Type dd, this will delete last line from the position where the cursor is on
Press 'k' one time so that the cursor now moves one line up.
Type 5dd, this will delete five lines from the position where the cursor is on
Type 10X so that the text to the right side of 'day' word gets removed.
:%s/work/day
Press h 9 times so that the cursor points before 'Good work'.
Type 16X so that the text to the right side of 'Good work' gets removed.
7) Save file and quit vim. What command did you use?
-> Press 'Escape' button and type :wq! and press [Enter]
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.