Requirements
- Create an hw04 directory in your hw directory
inside your it244 directory
- Go to the hw04 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
hw04.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 hw04.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 hw04.sh > /dev/null
Steps for Script
-
Using one Unix command, go to my home directory using tilde, ~ .
Once you are there, show me that you are in the right directory using pwd.
-
Using one Unix command, go to your home directory using tilde, ~ .
Once you are there, show me that you are in the right directory using pwd.
-
Make sure you are in your home directory.
Using one Unix command, go to your hw04 directory inside your
hw directory, inside your
it244 directory using a relative pathname.
Once you are there, show me that you are in the right directory.
-
Using one Unix command, go to my home directory using an absolute pathname.
Once you are there, show me that you are in the right directory.
-
Using one Unix command, go to the it244_files directory inside
the course_files directory, inside my home
directory, using an absolute pathname.
Once you are there, show me that you are in the right directory.
-
Using one Unix command, go to my home directory using a relative pathname employing
.. .
Once you are there, show me that you are in the right directory.
-
Using one Unix command, go to your home directory.
Once you are there go to your it244 directory using a
relative pathname.
Show me that your are in the correct directory.
-
Make sure you are in your it244 directory.
Using touch create a file named test.txt.
Go to your hw04 directory.
Using .. stay in your hw04 directory but list
the contents of your it244 directory.
-
Make sure you are in your hw04 directory.
Stay in this directory and
copy the test.txt file from your it244
directory to your hw04 directory using a relative pathname.
Show me that the copy operation succeeded by listing the contents of that directory.
-
Using one Unix command and multiple instances of .. ,
go to your home directory.
Once you are there, show me that you are in the right directory.
Using one Unix command, copy the test.txt file from your
it244/hw/hw04 directory to your home directory.
List the contents of the directory so I know the copy succeeded.