CSCI 211: Unix Lab
Homework 1
(Due February 8, 2016,  23:59:59PM)
Pre-step:
1.	Login through PuTTY.
2.	Run the command “cd ~”.
3.	Run the command "source /lab1/prep.sh" exactly once.

1.	Run the command "source /lab1/q1.sh", and answer the following questions.
a.	What is the name and path of the current directory?
Answer: 
Show the command you have used: 

b.	Change the current directory to your home directory. 
Show the command you have used: 

c.	Run the command "source /lab1/check-1b.sh". What is the number output by the command?
Answer:

d.	Run the command "source /lab1/q1.sh" again. 
What directories are existing at current directory?
Answer:
Show the command you have used: 

e.	Change the current directory to the directory named "p1.1". 
Show the command you have used: 

f.	Run the command "source /lab1/check-1e.sh". What is the number output by the command?
Answer:

g.	Run the command "source /lab1/q1.sh" again. In the directory "p1.2", there is a directory "sub1", in which there is a directory "sub2". Using one single command, change the current directory to the directory "sub2". 
Show the command you have used: 

h.	Run the command "source /lab1/check-1g.sh". What is the number output by the command?
Answer:

2.	Run the command "source /lab1/q2.sh", and answer the following questions.
a.	What are the names of the files and directories under the current directory? List them below. Ignore those starting with ".".
Answer: 
Files:
Directories:
	Show the command you have used:

b.	What are the names of the files starting with "." under the current directory?
Answer:
Show the command you have used:

c.	What is the 1) owner's name, 2) group name, 3) size (in bytes) and 4) last modification date AND time of the file named "testfile"? 
Answer:

d.	Explain the access permission (by identifying readable, writable, or executable) of the file named “testfile”.
Answer:
Access permission for user owner:
Access permission for group member:
Access permission for other users:

e.	Change the access permission of the file named "testfile" so that it can be readable, executable but not writable by group members and other users. 
The commands you have used (this could be multiple commands to achieve this):

f.	Run the command "source /lab1/check-2e.sh". What is the number output by the command?
Answer:

g.	Use two different commands to change your directory to the parent directory of the current one.
Show the first command you have used:
Show the second command you have used:

3.	Use the 'man' command to find out the command to list the content of a directory in the ascending order of file size using a long list format. The names of the content entries should be enclosed in double quotes. Show you commands below, and then copy and paste the relevant lines from the 'man' command output to justify your answer.

The command to find out the information is:
The command to list content is:
Relevant lines from 'man':

Post-steps:
1.	Run the command "source /lab1/wrapup.sh" exactly once. (Without this step, you will not receive any grade.)
2.	Submit this file with your answers.
Save this file as yourlastname_yourfirstname_Lab1.rtf and then submit online at 
http://www.networks.howard.edu/lij/courses/2016/211