Question
CSC3320 System Level Programming Lab Assignment 3 Purpose : Practices on editing a file via the vi editor. Learn how to set permissions for the
CSC3320 System Level Programming
Lab Assignment 3
Purpose: Practices on editing a file via the vi editor.
Learn how to set permissions for the files and directories.
Before you start, please connect to snowball by typing the following command and press "Enter".
ssh &..D@snowball.cs.gsu.edu
VI (or VIM) is a text editor that is commonly used in Unix and Linux operating systems. It is a modal text editor, meaning that it has different modes for inserting text, navigating the document, and performing commands. The VI editor supports many advanced features, including macros, regular expressions, and scripting.
Part A: Edit A Small File Using Vi Editor
Then please follow the steps to learn how to edit a small file via vi.
(1) Start the VI editor and createe a new file named "sample.txt.".
vi sample.txt
1.Type the following lines of text into the file:
This is a sample file.
I am practicing using the VI editor.
2.Save and close the file:
:wq
Reopen the file and add the following line after the second line:
I am learning how to use the VI editor efficiently.
Question: Attach screenshot of all the above
Part B: Edit A Large File Using Vi Editor.
Use the following command to copy the large file to your home directory.
cp /home/wpeng2/public/large_file.txt ~/
Use the VI editor to find and replace all occurrences of the word "puple" with "people" in the file..
- Question : What command should be typed?
Go to the beginning of the file and insert the following line:
This is a large file.
Go to the end of the file and add the following line:
End of large file.
- Question : Attach screenshot of all the above.
Part C: Permissions for files.
(1) Createe a new directory named "permissions_exercise" in the home directory.
Creaate a file named "file1.txt" inside the "permissions_exercise" directory.
Change the permissions of "file1.txt" so that the owner can read, write, and execute the file, while others can only read the file.
Creaate another file named "file2.txt" inside the "permissions_exercise" directory and set the permissions so that only the owner can read, write, and execute the file.
- Question : What command should be typed for part C?
- Question : Then issue the command ls -al to file1.txt and file2.txt
Attach screenshot of the output.
There are some questions asked. Don't attempted I've recently received a slew of incommplete responses, which is extremely frustrating. Please don't squander your or my time. If you are unable to answer of my questions, please disregard them. I don't want to squander my paid-for post-question time. Also, if you continue to give me incompplete answer, I will give you a thumbs down and will complain. Thank you very much.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started