Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. On crux, enter vi with the following command: vi periwinkle Enter some text,

ID: 3557808 • Letter: 1

Question

1. On crux, enter vi with the following command:

vi periwinkle

Enter some text, then save and quit with this command:

:wq jonquil

List the files in your directory. Which file is created, periwinkle or jonquil? Explain why. (This question assumes you do not already have files named periwinkle and/or jonquil in your directory.)


2. On crux, create and save a file called permtest.
Change the permissions:

chmod 444 permtest

Now open permtest in vi. Make a change to it, then try to save and quit with:

:wq

What happens? Why?


3. This question uses the two files from this week

Explanation / Answer

1.jonquil file will be created
beacuse in command mode we have written wq jonquil this means write and quit jonquil

2) when we set chmod 444 this means we giving permission to readonly to all users
we can not modify file content unless we have write permission.

3)3.1)create pwifle2 write at least five lines and save(ESC :wq)
then do following:-
2)vi pwfile2
3)5yy (yanking 5 line)
4)vi pwfile1
5)p

4)4. open vi editor
try (ESC :)
type :ab th Tranquil Hyenas
Now go to insert mode by pressing i
now when ever you have to write Tranquil Hyenas just write th when you hit space , abreaviation will be automatically expanded;