Posted date: Wednesday, January 11, 2012
Due date: Thursday, January 12, 2012
In this exercise,
you are required to give a shell command line for each of the following 14
questions.
Note: for each question, please test it once and record your test runs using
the script command.
In this assignment, you are asked to do the following (please do it in order) :
1. Inside the directory ~/CS2101/Lab1/
(if you do not have such a directory, create one),
create a folder whose name is your uwo username.
Copy also the text of this lab into ~/CS2101/Lab1/
2. list all the files under ~/CS2101/Lab1/ such that the folder you just created is listed at the bottom
3. cd to the folder you just created.
Use one command to create a file a.txt, whose content is:
hello
Create another file b.txt, whose content is: world
Concatenate the two files together and name the new file as c.txt
4. give at least two ways to display the content of the file a.txt
5. rename c.txt as d.txt
create a subfolder with the name hello inside the current folder
6. copy d.txt into the folder hello
7. remove the whole folder hello
8. create a symbolic link with name c.txt and pointing to d.txt
9. without leaving the current directory, use two ways to print your home directory
10. find all files with the name d.txt inside your home directory
11. print the type of the file d.txt
12. give the user execute permission for the file d.txt
13. use one command to cp all files ending with .txt to the folder hello
14. gives the group user executable access only to those files already executable in the current folder and its subfolder hello