Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
System Commands
Most repeated questions
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.
Type 1 · asked 4 times · Scheduling jobs with cron
Interpret a crontab entry: when or how often the job runs
- Q1MCQ4 Marks·Choose one optionEnd Term · 22 Dec 2024 (AN)Key ↓

- AEvery Monday at 02:30 in June
- BEvery Tuesday at 02:30 in June
- CEvery Monday at 06:30 in June
- DEvery Tuesday at 06:30 in July
- Q2MCQ4 Marks·Choose one optionEnd Term · 22 Dec 2024 (FN)Key ↓

- AEvery 15th of October at 23:45
- BEvery 15th of November at 23:45
- CEvery day at 23:45 in October
- DEvery day at 15:45 in October
- Q3NAT5 Marks·Write the numberEnd Term · 31 Aug 2025 (AN)Key ↓
Your answer: - Q4MSQ5 Marks·Choose all correct optionsEnd Term · 31 Aug 2025 (FN)Key ↓

- A

- B

- C

- D

- A
Type 2 · asked 3 times · awk, sort & text filters
Predict output of sort on keys piped to awk that drops duplicate keys
Type 3 · asked 3 times · awk, sort & text filters
Choose commands that print a given range of lines from a file
- Q8MSQ3 Marks·Choose all correct optionsEnd Term · 22 Dec 2024 (AN)Key ↓

- A

- B

- C

- D

- A
- Q9MSQ3 Marks·Choose all correct optionsEnd Term · 22 Dec 2024 (FN)Key ↓

- A

- B

- C

- D

- A
- Q10MSQ5 Marks·Choose all correct optionsEnd Term · 31 Aug 2025 (AN)Key ↓

- Ased -n '1,10p' file.txt
- Bsed 11q file.txt
- Cawk 'NR <= 10' file.txt
- Dcat -n 10 file.txt
Type 4 · asked 3 times · Shell expansion, pipes & redirection
Count matching lines from grep piped to wc -l
Type 5 · asked 2 times · Shell expansion, pipes & redirection
Predict the output of echo with nested brace expansion
Type 6 · asked 2 times · Regular expressions & grep
Choose the ERE pattern that matches lines with given field formats
Type 7 · asked 2 times · Regular expressions & grep
Choose a regex that matches an address format (MAC or IPv4)
Type 8 · asked 2 times · Regular expressions & grep
Palindrome strings with BRE backreferences
Type 9 · asked 2 times · awk, sort & text filters
Remove duplicate lines by the first three fields, keep first one
Type 10 · asked 2 times · Finding files: find & wildcards
Find file/directory names that start with a and end with e
Type 11 · asked 2 times · Bash scripting: logic, loops, functions
Which inputs make the leap-year script echo false or exit 1
Type 12 · asked 2 times · Bash scripting: logic, loops, functions
Trace a sed/tr script that builds an acronym from an argument
- Q28Short answer3 Marks·Write the answerEnd Term · 22 Dec 2024 (AN)Key ↓
NOTE: Enter the exact answer without any extra space in the beginning or at the end.Your answer: - Q29Short answer4 Marks·Write the answerEnd Term · 22 Dec 2024 (FN)Key ↓
NOTE:Enter the exact answer without any space in the beginning or at the end.Your answer:
Type 13 · asked 2 times · Bash scripting: logic, loops, functions
Count characters printed by a function called in a foreground loop
Type 14 · asked 2 times · Bash scripting: logic, loops, functions
Count characters printed when a function runs in the background (&)
Type 15 · asked 2 times · awk, sort & text filters
Count items with an awk associative array (word or IP frequency)
- Q34MCQ7 Marks·Choose one optionEnd Term · 13 Apr 2025 (FN)Key ↓
What is the primary purpose of this AWK script?- ATo convert contents of file to lowercase.
- BTo count the frequency of each word in a text file.
- CTo count the number of lines in a file.
- DTo replace all non-alphabetic characters in a file.
- Q35MCQ5 Marks·Choose one optionEnd Term · 31 Aug 2025 (AN)Key ↓

- 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
Type 16 · asked 2 times · Editing streams with sed
Swap two fields or words with sed backreferences
- Q36MCQ6 Marks·Choose one optionEnd Term · 13 Apr 2025 (FN)Key ↓

- ADeletes the first two fields in the CSV file.
- BSwaps the first and second fields of the CSV file.
- CAdds a new field to the CSV file.
- DReplaces all commas in the CSV file with spaces.
- Q37MSQ5 Marks·Choose all correct optionsEnd Term · 31 Aug 2025 (FN)Key ↓

- A

- B

- C

- D

- A
Type 17 · asked 2 times · Finding files: find & wildcards
What does find ... -exec ... do
Type 18 · asked 2 times · Files, links, permissions & archives
What does tar with --exclude and -czf do
- Q40MCQ6 Marks·Choose one optionEnd Term · 13 Apr 2025 (FN)Key ↓

- ACompresses the /remove directory into a tarball, excluding the /sample subdirectory, and names it backup.tar.gz.
- BDeletes the /sample subdirectory before creating a compressed tarball of /remove.
- CExtracts the contents of backup.tar.gz to /remove, excluding the /sample directory.
- DLists the contents of /remove, ignoring the /sample subdirectory.
- Q41MCQ5 Marks·Choose one optionEnd Term · 31 Aug 2025 (FN)Key ↓

- A

- B

- C

- D

- A
Type 19 · asked 2 times · Files, links, permissions & archives
Count the entries extracted by tar -xzf from a described archive
Type 20 · asked 2 times · Networking, packages & admin tools
Order the commands to troubleshoot a network or web service
Type 21 · asked 2 times · Text editors: vi, nano, ed, emacs
Match editors (vi, nano, ed, emacs) with commands or use cases
Type 22 · asked 2 times · Networking, packages & admin tools
Choose a command to show open or listening network ports
Type 23 · asked 2 times · Text editors: vi, nano, ed, emacs
Replace a word with the vi substitute command
- Q50MCQ6 Marks·Choose one optionEnd Term · 13 Apr 2025 (FN)Key ↓
Which of the following vi command is used to replace the word 'apple' with 'orange' only in lines 10 to 20 of a file, and appear at the beginning or end of the line, without case sensitive and without user interaction.
- A

- B

- C

- D

- A
- Q51MCQ3 Marks·Choose one optionQuiz 1 · 26 Oct 2025 (AN)Key ↓

- A

- B

- C

- D

- A
Type 24 · asked 2 times · Shell expansion, pipes & redirection
Subshells and the value of BASH_SUBSHELL
- Q52NAT6 Marks·Write the numberEnd Term · 13 Apr 2025 (FN)Key ↓
Your answer: - Q53MSQ5 Marks·Choose all correct optionsEnd Term · 31 Aug 2025 (AN)Key ↓
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
Official KeyMaster Answer Key & Explanations
Official answer keys from IIT Madras BS past papers. Click any question to review.
Reveal KeyCollapse Key
Master Answer Key & Explanations
Official answer keys from IIT Madras BS past papers. Click any question to review.
Detailed Answer Notes & Working
- Q28Answer: LAA
- Case-sensitive: the answer must match exactly.
- Q29Answer: HWFS
- Case-sensitive: the answer must match exactly.
























































