Please provide a step-by-step list and explain how to finish this task. GOAL: create directories and files and demonstrate command actions. Then create a shell
Please provide a step-by-step list and explain how to finish this task.
GOAL: create directories and files and demonstrate command actions. Then create a shell script by copying those actions into a file that is edited with VI. Then save the file, make it executable, and create the actions.
start the script command to capture the following steps in a text file: script s5.txt. 1. In your home directory, create three directories aa, bb, and cc 2. Display the permissions of each directory 3. Display the umask (should be 002 by default) 4. Remove the three directories aa, bb, and cc 5. Change the umask to 022 6. Create the three directories aa, bb, and cc again, display their permissions and note that both group write and other write are turned off 7. Change to aa and create a text file, last-name1.txt, using the cat command and keyboard data entry (remember to end the data entry with ^D, the Unix/Linux EOF character) (last-8. name is your last name) 8. Pipe last-name1.txt to wc to count the characters, words, and lines in the file 9. Display the file permissions for last-name1.txt, and note that group write and other write are turned off 10. Copy (cp) last-name1.txt to directory bb as last-name2.txt using a relative path 11. Use the diff command to show that last-name1.txt and last-name2.txt have no differences 12. Change the permissions on last-name1.txt to 442 and display the permissions, showing that the file now has owner and group write permissions 13. Change to directory cc using a relative path 14. Copy the last-name1.txt file into cc as last-name3.txt nn 15. Use the diff command to show that last-name3.txt and last-name2.txt have no differences 16. Display the file permissions for last-name2.txt, and note that group write and other write are turned off 17. Display the file permissions for last-name3.txt, and note that group write is on implying that it inherited permissions from its copy source 18. Go to the home directory, and exit the script (the exit command). Copy s5.txt to s5.sh. Run vi s5.sh to edit the script so that all that is left are the Unix commands (add #!/bin/bash as the first line, and umask 002 as the second line). Save the file and make s5.sh executable. 19. Use rm -r to remove aa bb and cc. 20. Run s5.sh to see that it recreates the files and directories.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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