0% found this document useful (0 votes)
2 views

Lab1.2-Introduction-Reminder

The document provides a series of exercises for Unix operating system administration, focusing on file and directory management, permissions, and data manipulation. Key tasks include creating directories, copying files, editing CSV content, and sorting data based on various criteria. The exercises aim to enhance practical skills in handling Unix commands and file operations.

Uploaded by

mam838343
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lab1.2-Introduction-Reminder

The document provides a series of exercises for Unix operating system administration, focusing on file and directory management, permissions, and data manipulation. Key tasks include creating directories, copying files, editing CSV content, and sorting data based on various criteria. The exercises aim to enhance practical skills in handling Unix commands and file operations.

Uploaded by

mam838343
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Operating system Administration: Unix

Lab1.2 – Introduction & Reminder

Exercice 1 :
1. Create a directory "rep1" in your home directory and move it to the directory “Desktop”.
2. Copy all files with extension ".xpm" (X11 Pixmap Graphic) from /usr/share/pixmaps to " rep1 ".
3. List the files in "rep1" in reverse alphabetical order.
4. Access your home directory. Create a new directory "rep2" and copy the entire content of the /etc
directory into it. Make sure to copy also the files and directories that are in the subdirectories of
/etc! (Recursive copy)
5. Go to "rep2" and create two directories "rep3" and "rep4". Move the files starting with a lowercase
letter to "rep3" and the files starting with an uppercase letter to "rep4". Use as few commands as
possible.
6. Delete the remaining files in "rep2".
7. Change the permissions of the "adduser.conf" file in "rep3" such that its owner can execute it.
8. Change your "umask" so that the new files created in "rep3" cannot be read by the others.
9. Create a symbolic link "s_link" for "adduser.conf" file in /var/tmp. Check that it works.

Exercice 2 :

1. Create a directory named "Departments" in your home directory.


2. Create two files in "Departments" named "Emplyes.csv" and "web.txt".
3. Edit the file "Emplyes.csv", copy the following content, save and exit:
Name, Grade, Experience Departement, Email address

Mohamed Salem , Engineer , 3 years , Web , [email protected]


Amal Hamed , Engineer , 5 years , Network , [email protected]
Hatem Hamdi , Technician , 10 years , Web , [email protected]
Amira Rekik , Engineer , 2 years, Web , [email protected]
Karim Abed , Assistant , 7 years , Marketing , [email protected]
Anis Daoud , Technician , 12 years , Network , [email protected]

4. Display the content of your file "Emplyes.csv" on the terminal.


5. Display only the first 3 lines of the file "Emplyes.csv" on the terminal.
Operating system Administration: Unix

6. Create another directory under your home directory called "Backup".


7. Copy the file "Emplyes.csv" to "Backup" and rename it "CopyEmplyes.csv".
8. Extract the names and email addresses of the employees belonging to the Web department from
the file "Emplyes.csv" and save them in "web.txt".
9. Search in the files of the directory "Departments" for the employee whose name is "Karim Abed".
10. Sort the lines of the file "Emplyes.csv" in alphabetical order and put them in a new file "tri.txt"
and display the number of employees.
11. Sort the lines of the file "Emplyes.csv" based the seniority of the employees from the oldest to
the least senior and put them in "tri_exp.txt".

You might also like