Lab1.1-Introduction & Reminder
Lab1.1-Introduction & Reminder
5. Let the above tree structure. From your home directory, we want to create this tree structure. To
do this:
a. Create two directories « Unix » and « Python » in your home directory.
b. Create two directories « Lab1 » et « Lab2 » in « Unix ».
c. Copy the directories « Lab1 » and « Lab2 » in « Python ».
d. Create two directories « Session1 » and « Session2 » in « Unix /Lab1».
e. Create two files « ex1 » and « ex2 » in the directory « Session1 ».
f. Copy the files « ex1 » and « ex2 » in « Python /Lab2 » with the new names «.ex1 » and «
.ex2 »
6. From the directory « Python/Lab1 », try to move to « Unix/Lab2 » using a relative path.
7. Get back to the directory « Python/Lab1 » using an absolute path.
8. Delete the directory « Lab1 » in « Python ».
1
9. Delete the directory « Lab2 » in « Python » using the command rmdir, did it work? Why?
Propose another command to delete the directory.
10. Move « ex1 » to « Lab1 » and delete « Session1 » and « Session2 ».
11. Rename « ex1 » to « exercice1 ».
B. Linux Permissions
1. Check the permissions configuration of the directory « Unix » and the file « exercice1 ».
2. Modify the permissions of the file « exercice1 » such that anyone can delete the file.
D. Search a File
1. Find in /etc all the file with the extension « .conf »
2. Find in /etc all the directories whose permissions rwx r-x r-x
3. Find in your home directory all the directories that are bigger than 3 Mbytes.
4. Find in /etc all the directories whose the name contains 3 characters and modified a week ago.
5. Delete all files in the home directory whose name starts with l or L.
2
E. Filter a text
1. Edit a new file exercice2 in « Unix » by inserting the following content:
9. Display the names of the 1st and 2nd year modules in the file « Report »