IT 244: Introduction to Linux/Unix
Homework 2

Due

Sunday, February 04th at 11:59 PM

Deliverables

There are two deliverables for this assignment:
  1. A text file named redsox.txt described below.
  2. 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
  1. Use cd to go to your home directory
  2. Verify that you are in your home directory using pwd
  3. List the contents of your home directory using ls
  4. Show all files in your home directory using ls -a
  5. Go to the directory /home/tsoro/course_files/it244_files
  6. Create a long listing of all the files in this directory
  7. Print to the terminal the contents of the file fruit.txt
  8. Print to the terminal the contents of the file red_sox.txt
  9. Use cd to go to your hw2 directory
  10. Verify that you are in your hw2 directory using pwd
  11. List the contents of your hw2 directory using ls
  12. 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.