IT 244: Introduction to Linux/Unix
Homework 2
Due
Sunday, February 04th at 11:59 PM
Deliverables
There are two deliverables for this assignment:
- A text file named redsox.txt described below.
- The typescript file from the Unix session described below.
The two files need to be placed in an hw2 directory, inside your
hw directory, inside your it244 directory.
From your home directory go to your it244 directory:
cd it244
Create an hw directory:
mkdir hw
Enter this new directory:
cd hw
Create an hw2 directory:
mkdir hw2
Enter this new directory:
cd hw2
Make sure you are in this directory when you run script
.
Details
Creating redsox.txt
I want to give you some experience using nano
or a Unix text editor of your choice
to create a structured document.
To do this I am going to ask you to create a text file with the results of some Red Sox games from the early part of this season.
Create text file redsox.txt in the hw2 directory you created above.
Go to your hw2 directory inside your hw directory,
inside your it244 directory.
Make sure you are in this directory:
pwd
Now run
nano redsox.txt
Go to the
Red Sox schedule for May and enter the results of the first 5 games in the following format:
Monday, May 1, 2017
Red Sox vs Orioles
L 2-5
40 points
The typescript file
Make sure you are in it244/hw/hw2 then run
script
and perform the following actions.
It is best if you practice these operations first, before running script
.
That way, your typescript file will be shorter and I'll have an easier time grading it.
If you do make a mistake in your script
session, just try again.
60 points
- Use
cd
to go to your home directory
- Verify that you are in your home directory using
pwd
- List the contents of your home directory using
ls
- Show all files in your home directory using
ls -a
- Go to the directory /home/tsoro/course_files/it244_files
- Create a long listing of all the files in this directory
- Print to the terminal the contents of the file fruit.txt
- Print to the terminal the contents of the file red_sox.txt
- Use
cd
to go to your hw2 directory
- Verify that you are in your hw2 directory using
pwd
- List the contents of your hw2 directory using
ls
- Show all the files in your hw2 directory, including the "invisible" ones
Make sure you type
exit
after you have completed the last step in your script session.
If you don't, the typescript file will not be created.
Make sure the typescript file is in the hw2 directory.