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

Performance_on_Test_Shell_Commands

This document has a performance test question on shell commands.

Uploaded by

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

Performance_on_Test_Shell_Commands

This document has a performance test question on shell commands.

Uploaded by

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

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 ‘report.txt’ in ‘/ProjectX’. Add the text
"ProjectX Progress Report" to the file.

8. Create a text file ‘logs.txt’ 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 ‘logs.txt’ that contain the word "Error" using the ‘grep’
command.

10. Count the total number of lines in ‘logs.txt’ containing the word "Error".

You might also like