CSCI 211: Unix Lab
Homework 2
(Due February 15, 2016,  23:59:59PM)

Note: You must rely on UNIX commands only to solve the problems. No manipulation on Windows is allowed (such as scrolling the PuTTY screen). Otherwise no credits will be given if the answers are correct.
Pre-step:
Run the command "source /lab2/quiz/prep.sh". (Once you have done some problems, DO NOT run it again, otherwise you will have to start all over again.)
Note:
•	You must do the problems in the given order.
•	You must use a single command for each of the following operations unless specified otherwise.

1.	Create a directory named "mydir", then run the command "source /lab2/quiz/check.sh 1".
Show your command:

2.	Move the file "comedy" from the current directory to the directory "story", then run the command "source /lab2/quiz/check.sh 2".
Show your command:

3.	Rename the directory "story" to "stories", then run the command "source /lab2/quiz/check.sh 3".
Show your command:

4.	Move all the files of which the name ends with "boat" to the directory named "port", then run the command "source /lab2/quiz/check.sh 4". (You MUST use one single command with wildcard characters.)
Show your command: 

5.	Remove the directory "junk", then run the command "source /lab2/quiz/check.sh 5". (If the directory is not empty, you may use multiple commands but a single command can do this.)
Show your command: 

6.	Remove the directory "trash", then run the command "source /lab2/quiz/check.sh 6". (If the directory is not empty, you may use multiple commands but a single command can do this.)
Show your command: 

7.	Copy the file "squirrel" to a file named "chipmunk", then run the command "source /lab2/quiz/check.sh 7".
Show your command:

8.	Remove the file "squirrel", then run the command "source /lab2/quiz/check.sh 8".
Show your command:

9.	Copy all the files and directories of which the name has 'xyz' string from the current directory to the directory named "sandbox", then run the command "source /lab2/quiz/check.sh 9". (You MUST use one single command with wildcard characters.)
Show your command:

10.	Remove from the current directory all the files and directories of which the name has 'xyz' string, then run the command "source /lab2/quiz/check.sh 10". (You MUST use one single command with wildcard characters.)
Show your command: 

11.	Create a file named "path.txt" with the exact content "The following line is the value of PATH." without using an editor, then run the command "source /lab2/quiz/check.sh 11".
Show your command:

12.	Append the value of the environment variable PATH to the file "path.txt" without using an editor, then run the command "source /lab2/quiz/check.sh 12".
Show your command: 

13.	Show the content of the file "path.txt" on the screen.
Show your command:

14.	Show the content of the file "path.txt" on the screen but redirect the output to file named "path2.txt". Run the command "source /lab2/quiz/check.sh 14".
Show your command:

15.	Run the command "badcmd", redirect the error message to a file named "err.txt". Run the command "source /lab2/quiz/check.sh 15".
Show your command:

16.	Show the content of the file "manypages" one screen a time and find the line shorter than all others. 
Show your command:
Show the shorter line of the file:

17.	The command "ls -lrt" list the content of the current directory sorted by the modification time in the increasing order. The command "tail -1" (the flag is the number one) prints the last line of standard input. Combine the two commands in a single command to show the information of the latest modified file. Show your command as well as the name of the latest modified file.
Show your command:
Last modified file name:

Post-steps:
1.	Run the command "source /lab2/quiz/wrapup.sh" exactly once. 
2.	Submit this file with your answers.
Save this file and then submit online at 
http://www.networks.howard.edu/lij/courses/2016/211/