Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

10) Try read Try.c again using cat. Attach a screenshot of the output 11) Use chmod with an octal number to let all the users

image text in transcribedimage text in transcribedimage text in transcribed

10) Try read "Try.c" again using cat. Attach a screenshot of the output 11) Use chmod with an octal number to let all the users only have read permission for "Try.c". 12) Check the file permissions for file "Try.c" again. And explain the meaning of each character in the file permission string. 13) Try the vi editor again to modify the file. Then remove one line by pressing dd Lab3.pdf (page 2 of 8) O'Q Q Lab3.pdf (page 2 of 8) Q Search 2) Move cursor to the beginning of "Error!" 3) Use vi to open "RealEstate.csv". 3) Insert "xxx". 4) Move the cursor to the last line (without knowing the number of last line). 5) Display line number. 6) Display line number. 4) Append a blank line after the current line. 5) Delete "xxx". 7) Search for the transaction for the estate located at "I1 E ST" Which line is this string located? (Please just write down the line number) 6) Copy the first 2 lines, move cursor to the beginning of file, and then paste it after current line 7) Delete the first 2 lines Delete this line. 8) Save it 8) Move the cursor to the line 50 9) Substitute all comma "," with colon":"from line 50 to line 54. 9) Replace all "fptr" with "FPTR 10) Copy line 50 to line 54 to the end of file. 10) Save and exit. 11) Remove line 50 to line 54. 12) Describe how to enter the text mode and insert a new line "Recorded in year 2008" between line 1 and line 2. 13) Switch back to command mode. 14) Save the file and quit vi. Part 2: VI Editing - Large file Part 3: Permissions for files Follow the instructions step by step and finish the questions as required. 1) Go into your Lab3 directory. 1) Go into your Lab3 directory. 2) Copy "RealEstate.csv" from instructor's public directory to your Lab3 directory again. Scp /home/sluo10/public/RealEstate.csv 2) Check the file permissions for file "Try.c" in your own Lab3 directory. Please write the commands you will issue to complete the following tasks and answering corresponding questions step by step. 3) You may see similar output as below, in which rw-rw-r-- of the first field is the file permission string for Try.c". Lab3.pdf (page 4 of 8) Q Search 10) Try read "Try.c" again using cat. (ylong4@gsuad.gsu.edu@snowball Lab3] $ ls -1 Try.c -W-IWI--, lylongigauad.gu.edu ylongiqsuad.gsu.edu 379 Sep 11 19:09 Try.c Attach a screenshot of the output. 11) Use chmod with an octal number to let all the users only have read permission for "Try.c". The leftmost 3 characters rw- tells us that the user (owner of the file) can only read and write the file. The middle 3 characters rw- tells us the other users in the same group as the owner can only read and write the file. The last 3 characters -- tells us the other users in the other groups different from owner can only read the file. 12) Check the file permissions for file "Try.c" again. And explain the meaning of each character in the file permission string. Note: once you copy a file from other directory or download a file from other resources, you are the owner of the new copied or downloaded file. 4) Remove the read permission for the owner (yourself). 13) Try the vi editor again to modify the file. Then remove one line by pressing dd 5) Check the file permissions for file "Try.c" again. 14) Try to save the file in the vi editor. 6) You may see similar output as below, in which -w-rw-r-- of the first field is the file permission string for "Try.c". 15) Can you find some error message at the bottom of the screen? If yes, what is it and how to quit the vi editor without saving the modification. 16) Use chmod to add write the permission to all the users for "Try.c". (ylong4@gsuad.gsu.edu@snowball Lab3] $ ls -1 Try.c --w-rw-r--, lylong4suad.su.edu ylongcauad.qu.edu 379 Sep 11 19:11 Try. So -w- in the leftmost 3 characters tells us that the user (owner of the file) only has the permission to write something into the file. 17) Check the file permissions for file "Try.c" again. And explain the meaning of each character in the file permission string. 7) Try the vi editor again to modify the file. Part 4: Permissions for directories 8) However, you may find following message displayed at the bottom of the screen which means you do not have the right to read "Try.c". 0,0-1 All "Try.c" (Permission Denied] 9) Quit vi editor. The permissions also work for the directories. However, the permissions for the directories may have different behaviors. Let us learn the permissions for directories by only changing different permissions to the owner of the file. 1) Go to your home directory and then check the permissions for directory Lab3. Sed $ls -ld-/Lab3 10) Try read "Try.c" again using cat. Attach a screenshot of the output 11) Use chmod with an octal number to let all the users only have read permission for "Try.c". 12) Check the file permissions for file "Try.c" again. And explain the meaning of each character in the file permission string. 13) Try the vi editor again to modify the file. Then remove one line by pressing dd Lab3.pdf (page 2 of 8) O'Q Q Lab3.pdf (page 2 of 8) Q Search 2) Move cursor to the beginning of "Error!" 3) Use vi to open "RealEstate.csv". 3) Insert "xxx". 4) Move the cursor to the last line (without knowing the number of last line). 5) Display line number. 6) Display line number. 4) Append a blank line after the current line. 5) Delete "xxx". 7) Search for the transaction for the estate located at "I1 E ST" Which line is this string located? (Please just write down the line number) 6) Copy the first 2 lines, move cursor to the beginning of file, and then paste it after current line 7) Delete the first 2 lines Delete this line. 8) Save it 8) Move the cursor to the line 50 9) Substitute all comma "," with colon":"from line 50 to line 54. 9) Replace all "fptr" with "FPTR 10) Copy line 50 to line 54 to the end of file. 10) Save and exit. 11) Remove line 50 to line 54. 12) Describe how to enter the text mode and insert a new line "Recorded in year 2008" between line 1 and line 2. 13) Switch back to command mode. 14) Save the file and quit vi. Part 2: VI Editing - Large file Part 3: Permissions for files Follow the instructions step by step and finish the questions as required. 1) Go into your Lab3 directory. 1) Go into your Lab3 directory. 2) Copy "RealEstate.csv" from instructor's public directory to your Lab3 directory again. Scp /home/sluo10/public/RealEstate.csv 2) Check the file permissions for file "Try.c" in your own Lab3 directory. Please write the commands you will issue to complete the following tasks and answering corresponding questions step by step. 3) You may see similar output as below, in which rw-rw-r-- of the first field is the file permission string for Try.c". Lab3.pdf (page 4 of 8) Q Search 10) Try read "Try.c" again using cat. (ylong4@gsuad.gsu.edu@snowball Lab3] $ ls -1 Try.c -W-IWI--, lylongigauad.gu.edu ylongiqsuad.gsu.edu 379 Sep 11 19:09 Try.c Attach a screenshot of the output. 11) Use chmod with an octal number to let all the users only have read permission for "Try.c". The leftmost 3 characters rw- tells us that the user (owner of the file) can only read and write the file. The middle 3 characters rw- tells us the other users in the same group as the owner can only read and write the file. The last 3 characters -- tells us the other users in the other groups different from owner can only read the file. 12) Check the file permissions for file "Try.c" again. And explain the meaning of each character in the file permission string. Note: once you copy a file from other directory or download a file from other resources, you are the owner of the new copied or downloaded file. 4) Remove the read permission for the owner (yourself). 13) Try the vi editor again to modify the file. Then remove one line by pressing dd 5) Check the file permissions for file "Try.c" again. 14) Try to save the file in the vi editor. 6) You may see similar output as below, in which -w-rw-r-- of the first field is the file permission string for "Try.c". 15) Can you find some error message at the bottom of the screen? If yes, what is it and how to quit the vi editor without saving the modification. 16) Use chmod to add write the permission to all the users for "Try.c". (ylong4@gsuad.gsu.edu@snowball Lab3] $ ls -1 Try.c --w-rw-r--, lylong4suad.su.edu ylongcauad.qu.edu 379 Sep 11 19:11 Try. So -w- in the leftmost 3 characters tells us that the user (owner of the file) only has the permission to write something into the file. 17) Check the file permissions for file "Try.c" again. And explain the meaning of each character in the file permission string. 7) Try the vi editor again to modify the file. Part 4: Permissions for directories 8) However, you may find following message displayed at the bottom of the screen which means you do not have the right to read "Try.c". 0,0-1 All "Try.c" (Permission Denied] 9) Quit vi editor. The permissions also work for the directories. However, the permissions for the directories may have different behaviors. Let us learn the permissions for directories by only changing different permissions to the owner of the file. 1) Go to your home directory and then check the permissions for directory Lab3. Sed $ls -ld-/Lab3

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

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions

Question

Buddy Dog Foods management to change its focus?

Answered: 1 week ago