MauryaHub PYQ Practice

System Commands · End Term · Jan 2026 · AN

System Commands · End Term · Jan 2026 AN

← Course papers · Start practice / exam

Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.

0 / 20 published solutions

Question 2 NAT · 5.0 marks

You are given a file emp.txt with the following contents
Source diagram or notation
You execute the following command
Source diagram or notation
How many lines will be printed as output?

A published solution is not available for this question yet.

Report a correction for Q2

Question 3 NAT · 5.0 marks

What will be the output of the following command?
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q3

Question 4 NAT · 5.0 marks

What is the output after executing the following shell script?
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q4

Question 5 NAT · 5.0 marks

What is the output after executing the following shell script?
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q5

Question 6 NAT · 5.0 marks

A developer runs the following shell commands to create a directory structure and count the number of **files** present:
Source diagram or notation
Counts number of files found.

A published solution is not available for this question yet.

Report a correction for Q6

Question 7 NAT · 5.0 marks

A data analyst is processing a file that contains product categories and sales values:
Source diagram or notation
They run the following awk script:
Source diagram or notation
What is the output produced by the above command?

A published solution is not available for this question yet.

Report a correction for Q7

Question 8 NAT · 5.0 marks

A commit tree has
Source diagram or notation
Total number of Git objects stored = ?

A published solution is not available for this question yet.

Report a correction for Q8

Question 9 MCQ · 5.0 marks

When the following shell command is executed
Source diagram or notation
How many lines get printed?
A.
2
B.
4
C.
1
D.
Error

A published solution is not available for this question yet.

Report a correction for Q9

Question 10 MCQ · 5.0 marks

After executing the following shell script
Source diagram or notation
What is printed on the terminal?
A.
Hello World
B.
World Hello
C.
Hello
D.
World

A published solution is not available for this question yet.

Report a correction for Q10

Question 11 MCQ · 5.0 marks

Consider the following script
Source diagram or notation
What is the purpose of the above script?
A.
Delete all duplicates
B.
Remove adjacent duplicate lines
C.
Sort lines
D.
Remove blank lines

A published solution is not available for this question yet.

Report a correction for Q11

Question 12 MCQ · 5.0 marks

A research team collected responses stored in a file called
Source diagram or notation
The file contains the following entries:
Source diagram or notation
They apply the following sed script named
Source diagram or notation
:
Source diagram or notation
The command executed is:
Source diagram or notation
How many lines are there in the final output?
A.
7
B.
6
C.
4
D.
5

A published solution is not available for this question yet.

Report a correction for Q12

Question 13 MCQ · 5.0 marks

A DevOps engineer wants to check whether the keyword foo appears in a log file named file.txt before triggering an alert. They use the following Bash command:
Source diagram or notation
When does YES print?
A.
when file exists
B.
when foo found
C.
always
D.
never

A published solution is not available for this question yet.

Report a correction for Q13

Question 14 MCQ · 5.0 marks

A developer creates the following Makefile in an empty project directory:
Source diagram or notation
They now run the command for the first time:
Source diagram or notation
How many **shell commands** will be executed by make?
A.
1
B.
2
C.
3
D.
0

A published solution is not available for this question yet.

Report a correction for Q14

Question 15 MCQ · 5.0 marks

If two developers clone the same remote repository and independently create commits on the same file and push without pulling, what will happen?
A.
Last push overwrites previous
B.
Remote automatically merges
C.
Push rejected for non-fast-forward
D.
Both commits are appended linearly

A published solution is not available for this question yet.

Report a correction for Q15

Question 16 MSQ · 5.0 marks

After executing the following script
Source diagram or notation
Which of the given options are TRUE?
A.
Output contains one N
B.
Output contains two N
C.
Output starts with N
D.
Infinite loop

A published solution is not available for this question yet.

Report a correction for Q16

Question 17 MSQ · 5.0 marks

A system administrator is troubleshooting DNS resolution delay on a Linux server. To quickly check the resolved IP address of a domain without unnecessary verbose output, the admin runs the following command
Source diagram or notation
Which of the following statements are TRUE about the command?
A.
Shows only IPs
B.
Shows full DNS trace
C.
Suppresses headers
D.
Faster output

A published solution is not available for this question yet.

Report a correction for Q17

Question 18 MSQ · 5.0 marks

A system administrator adds the following entry in the crontab to automate report generation:
Source diagram or notation
Which of the following statements are TRUE? Note:- the following is the Cron format
Source diagram or notation
A.
Runs 6 times daily
B.
Standard error is redirected
C.
Executes only in the morning hours
D.
Log file is overwritten

A published solution is not available for this question yet.

Report a correction for Q18

Question 19 MSQ · 5.0 marks

A DevOps engineer writes the following shell script to check whether a string variable is lexicographically greater than the value "b" before proceeding with a deployment step:
Source diagram or notation
The script is executed in a Linux environment. What is the result of executing the above script?
A.
YES
B.
NO
C.
creates a file named b
D.
syntax error

A published solution is not available for this question yet.

Report a correction for Q19

Question 20 MCQ · 5.0 marks

Consider the following data to answer the given sub-questions. The **employees.txt** file contains the following data:
Source diagram or notation
The **attendance.txt** file contains the following data:
Source diagram or notation
And the script **report.awk** is :
Source diagram or notation
Run the script report.awk as :
Source diagram or notation
If an employee ID is missing in the attendance file, what happens?
A.
Script crashes
B.
days[id] becomes 0
C.
Treated as present
D.
Skipped

A published solution is not available for this question yet.

Report a correction for Q20

Question 21 NAT · 5.0 marks

Consider the following data to answer the given sub-questions. The **employees.txt** file contains the following data:
Source diagram or notation
The **attendance.txt** file contains the following data:
Source diagram or notation
And the script **report.awk** is :
Source diagram or notation
Run the script report.awk as :
Source diagram or notation
The Value of the present variable is?

A published solution is not available for this question yet.

Report a correction for Q21