IT 244: Introduction to Linux/Unix
Homework 4
Due
Sunday, September 29th at 11:59 PM
What You Need to Do
- Create the script hw4.sh
with Unix commands that will do what is described in the steps
below
- This file must be in an hw4
directory under your hw directory
Setup
-
From your home directory go to your it244
directory
cd it244
- Go to your hw directory
cd hw
- Create an hw4 directory
mkdir hw4
- Enter this new directory
cd hw4
- Create hw4.sh
nano hw4.sh
Specification
- Run
nano
to create
hw4.sh
- Into this file write the Unix commands for each step
- The commands for each step must by labeled with a Step
number
- Write # followed by the word
"Step" and the step number
-
Using one Unix command, go to my home directory using
tilde, ~.
-
Using one Unix command, go to your home directory using
tilde, ~.
-
You should be in your home directory.
Using one Unix command, go to your hw4
directory inside your
hw directory, inside your
it244 directory using a relative pathname.
-
Using one Unix command, go to my home directory using
an absolute pathname.
-
Using one Unix command, go to the it244_files
directory inside the course_files directory,
inside my home directory, using an absolute pathname.
-
Using one Unix command, go to my home directory using
relative pathname using one or more instances of
.. .
-
Using one Unix command, go to your home directory.
Once you are there go to your it244 directory
using a relative pathname.
-
You should be in your it244 directory.
Using touch
create a file named test.txt.
Go to your hw4 directory.
Using .. stay in your
hw4 directory but list
the contents of your it244 directory.
-
Stay in your hw4 directory and
copy the test.txt file from your
it244 directory to your
hw4 directory using a relative pathname.
-
Using one Unix command go to your home directory.
Using one Unix command, copy the test.txt
file from your it244/hw/hw4 directory to
your home directory.
Testing
Copyright © 2020 Glenn Hoffman. All rights reserved. May not be reproduced without permission.