Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Requirements Create an hw4 directory in your hw directory inside your it244 directory Go to the hw4 directory and run Unix commands that will execute

Requirements

Create an hw4 directory in your hw directory inside your it244 directory

Go to the hw4 directory and run Unix commands that will execute the steps below

When you have a command line that does what the step asks you to do, paste it into hw4.sh using nano or any other text editor

When you have completed all the steps, create an echo statement before the commands for each step, that will print the step number to the terminal

Testing

The script hw4.sh must have the format specified in this document

Scripts that do not follow the rules specified in the document mentioned above will will have points deducted from their score

Be sure to test your script and correct any errors you find

You will lose 5 points for each error that occurs when running your script

To run your script and see only the error messages run the following command

bash hw4.sh > /dev/null 

Once you have run your script once, you must delete the directories dir1, dir2 and dir3, as well as the link homework before testing again. This can be done with the following commands

rm -rf dir* rm homework 

NOTE: NANO PLEASE

Steps for Script

1) Create a file named work.sh in your hw4 directory. Give this file read and write permission (no execute permissions) for you alone. No other account should have any access privileges to this file. Show the access permissions of this file.

2)Change the permissions on the work.sh file so you have read and write permissions. Give everybody else, including the group, read permissions only. Show the access permissions of this file.

3)Give yourself read, write and execute permissions to the file work.sh. Give everyone else, including the group, execute permissions only. Show the access permissions of this file.

4)Create a directory named dir1 in your hw4 directory. Give all users, including the group, read, write and execute access to this directory. Show the permissions on this directory.

5)Create a directory named dir2 in your hw4 directory. Give yourself read, write and execute permissions on this directory. Give the group and everyone else only those permissions which will let them run ls on this directory, but nothing else. Show the permissions on this directory.

6)Create a directory named dir3 in your hw4 directory. Give yourself full permissions to this directory. Give only the group the ability to run ls on this directory and to cd into it. Give everyone else no privileges on this directory. Show the permissions on this directory.

7)Make sure you are in your hw4 directory. Create a symbolic link named homework in your current directory to your hw directory. Show the permissions on this link.

8)Use the homework link you just created to go to your hw directory. Show me you are in the correct location.

9)Go back to your hw4 directory. Show the true location of this directory in the /courses hierarchy.

10)Go to your home directory. Perform a long listing to see the absolute pathname of your it244 directory. cd into this directory using an absolute pathname. This pathname must include the /courses directory. Show your new location.

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

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions