Lab Performance Test: Shell Commands
You are tasked to manage a project called ‘ProjectX’. Perform the following tasks step by
step.
Task 1: User and Group Management
1. Create two users named ‘user1’ and ‘user2’.
2. Create a group named ‘project_group_x’.
3. Add both ‘user1’ and ‘user2’ to the ‘project_group_x’.
Task 2: Project Directory Setup
4. Create a project directory ‘/home/projects/ProjectX’.
5. Change the group ownership of the ‘/ProjectX’ directory to ‘project_group_x’.
6. Set permissions so only members of ‘project_group_x’ can read, write, and execute
files in ‘/ProjectX’.
Task 3: File Creation
7. Switch to ‘user1’ and create a file named ‘[Link]’ in ‘/ProjectX’. Add the text
"ProjectX Progress Report" to the file.
8. Create a text file ‘[Link]’ in ‘/ProjectX’ with the following content:
```
Error: File not found
Warning: Low disk space
Info: System update completed
Error: Connection timed out
```
Task 4: Grep Command Application
9. Extract all lines from ‘[Link]’ that contain the word "Error" using the ‘grep’
command.
10. Count the total number of lines in ‘[Link]’ containing the word "Error".