Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
System Commands
End Term · 31 Aug 2025 (Afternoon)
Examination Instructions & Guidelines
- Solve on notebook/paper first before checking solutions.
- MCQ: Exactly 1 option is correct. Negative marking applies.
- MSQ: One or more options correct. Select all to score.
- NAT: Numerical response. No negative marking.
- Scientific calculator allowed for all calculations.
- Official answer key is sealed at the end of this sheet.
- Q1MCQ5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q2MCQ5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q3MCQ5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q4MCQ5 Marks·Choose one option
You suspect a configuration file for the package nginx was modified manually. Which command will verify this without reinstalling or removing the package?
- A

- B

- C

- D

- A
- Q5MCQ5 Marks·Choose one option
A file numbers.txt contains several lines of numeric strings. You want to find lines where any digit is repeated exactly twice consecutively (like "1123", "4456"). Which command works correctly?
- A

- B

- C

- D

- A
- Q6MCQ5 Marks·Choose one option
You're using gawk to identify repeated words in notes.txt. Which gawk statements correctly use backreferences?
- A

- B

- C

- D

- A
- Q7MCQ5 Marks·Choose one option

- AOnly link target runs
- BBoth compile and link run
- CNothing runs since main.o exists
- DOnly compile runs
- Q8MCQ5 Marks·Choose one option

- Ared and green
- Bred and blue
- Cgreen and yellow
- Dred and yellow
- Q9MCQ5 Marks·Choose one option

- A192.168.0.1 3
- B192.168.0.2 2
- C192.168.0.3 1
- DBoth 192.168.0.1 3 and 192.168.0.2 2
- Q10MCQ5 Marks·Choose one option

- AFirst line of each paragraph
- BAll blank lines
- CEntire file in one line
- DFirst field of each line
- Q11MSQ5 Marks·Choose all correct options

- Ased -n '1,10p' file.txt
- Bsed 11q file.txt
- Cawk 'NR <= 10' file.txt
- Dcat -n 10 file.txt
- Q12MSQ5 Marks·Choose all correct options
Below is the man page of `grep`.
Which of the following commands will print only the name of all .txt files that do not contain the word "error"? Assume the current directory does not have any subdirectories. Assume the filenames are alphanumeric.- Agrep -L "error" *.txt
- Bgrep -v "error" *.txt
- Cgrep -L "error" -- *.txt
- Dfind . -name "*.txt" | xargs grep -L "error"
- Q13MSQ5 Marks·Choose all correct options
Which of the following statements about subshells is/are true?
- A(cd /tmp; ls) runs in a subshell
- Bcd /tmp; ls runs in a subshell
- CVariables set in a subshell are visible to the parent shell
- DCommands inside $(...) are executed in a subshell
- Q14MSQ5 Marks·Choose all correct options

- A

- B

- C

- D

- E

- A
- Q15MSQ5 Marks·Choose all correct options
Which of the following find commands will list all regular files in /var/log modified more than 7 days ago and larger than 5MB?
- A

- B

- C

- D

- A
- Q16NAT5 Marks·Write the number
Your answer: - Q17NAT5 Marks·Write the number
Your answer: - Q18NAT5 Marks·Write the number
Your answer: - Q19NAT5 Marks·Write the number
Your answer: - Q20NAT5 Marks·Write the number
Your answer: