
System Commands End Term: 31 August 2025, Set QDD3 (May 2025 term)
The IIT Madras BS System Commands (System Commands) End Term paper sat on 31 Aug 2025, in the May 2025 term, set QDD3: 20 questions for 100 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.
- 20
- 100
- 180 min
- 10
- 5
- 5
Show answer
Correct answer
Question 2
Show answer
Correct answer
Question 3
Show answer
Correct answer
Question 4
You suspect a configuration file for the package nginx was modified manually. Which command will verify this without reinstalling or removing the package?
Show answer
Correct answer
Question 5
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?
Show answer
Correct answer
Question 6
You're using gawk to identify repeated words in notes.txt. Which gawk statements correctly use backreferences?
Show answer
Correct answer
Question 7
Only link target runs
Both compile and link run
Nothing runs since main.o exists
Only compile runs
Show answer
Correct answer
Both compile and link run
Question 8
red and green
red and blue
green and yellow
red and yellow
Show answer
Correct answer
red and blue
Question 9
192.168.0.1 3
192.168.0.2 2
192.168.0.3 1
Both 192.168.0.1 3 and 192.168.0.2 2
Show answer
Correct answer
192.168.0.1 3
Question 10
First line of each paragraph
All blank lines
Entire file in one line
First field of each line
Show answer
Correct answer
First line of each paragraph
Question 11
sed -n '1,10p' file.txt
sed 11q file.txt
awk 'NR <= 10' file.txt
cat -n 10 file.txt
Show answer
Correct answers
sed -n '1,10p' file.txt
sed 11q file.txt
awk 'NR <= 10' file.txt
Question 12
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.
grep -L "error" *.txt
grep -v "error" *.txt
grep -L "error" -- *.txt
find . -name "*.txt" | xargs grep -L "error"
Show answer
Correct answers
grep -L "error" *.txt
grep -L "error" -- *.txt
find . -name "*.txt" | xargs grep -L "error"
Question 13
Which of the following statements about subshells is/are true?
(cd /tmp; ls) runs in a subshell
cd /tmp; ls runs in a subshell
Variables set in a subshell are visible to the parent shell
Commands inside $(...) are executed in a subshell
Show answer
Correct answers
(cd /tmp; ls) runs in a subshell
Commands inside $(...) are executed in a subshell
Question 14
Show answer
Correct answers
Question 15
Which of the following find commands will list all regular files in /var/log modified more than 7 days ago and larger than 5MB?
Show answer
Correct answers
Question 16
Show answer
Correct answer: 1
Question 17
Show answer
Correct answer: 120
Question 18
Show answer
Correct answer: 9
Question 19
Show answer
Correct answer: 2
Question 20
Show answer
Correct answer: 25