Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
System Commands
All 2025 papers
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.
Quiz 1 · 26 Oct 2025 (AN)Quiz 1
- Q1MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q2MCQ3 Marks·Choose one option

- AOwner can only execute, group can only write, others can read
- BOwner can read and execute, group can read and execute, others can read
- COwner can read and execute, group can write and execute, others can read
- DOwner can read and execute, group can read and write, others can read and write
- Q3MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q4MCQ3 Marks·Choose one option
Which command will give information on open network ports on the machine?
- A

- B

- C

- D

- A
- Q5MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q6MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q7MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q8MCQ3 Marks·Choose one option

- ALines starting with 3 letters and containing 2 digits anywhere.
- BLines containing exactly 3 letters followed by exactly 2 digits.
- CLines ending with 2 digits.
- DAny line containing at least 3 letters and 2 digits.
- Q9MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q10MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
- Q11MSQ3 Marks·Choose all correct options

- A

- B

- C

- D

- A
- Q12MSQ3 Marks·Choose all correct options
Which command is used to display the IP address and network interfaces of your Ubuntu system?
- A

- B

- C

- D

- E

- A
- Q13NAT3 Marks·Write the number
Your answer: - Q14NAT4 Marks·Write the number
Your answer: Read the passage below, then answer Q15–Q16

Based on the above data, answer the given subquestions.
Q15MSQ3 Marks·Choose all correct options
- A

- B

- C

- D

- A
- Q16MSQ3 Marks·Choose all correct options

- A

- B

- C

- D

- A
End Term · 31 Aug 2025 (FN)End Term
- Q17MCQ5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q18MCQ5 Marks·Choose one option

- A

- B

- C

- D

- E

- A
- Q19MCQ5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q20MCQ5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q21MCQ5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q22MCQ5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q23MCQ5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q24MCQ5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q25MCQ5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q26MCQ5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q27MCQ5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q28MSQ5 Marks·Choose all correct options

- A

- B

- C

- D

- A
- Q29MSQ5 Marks·Choose all correct options

- A

- B

- C

- D

- A
- Q30MSQ5 Marks·Choose all correct options

- A

- B

- C

- D

- A
- Q31MSQ5 Marks·Choose all correct options

- A

- B

- C

- D

- A
- Q32MSQ5 Marks·Choose all correct options

- A

- B

- C

- D

- A
- Q33MSQ5 Marks·Choose all correct options

- A

- B

- C

- D

- A
- Q34MSQ5 Marks·Choose all correct options

- A

- B

- C

- D

- A
- Q35NAT5 Marks·Write the number
Your answer: - Q36NAT5 Marks·Write the number
Your answer:
End Term · 31 Aug 2025 (AN)End Term
- Q37MCQ5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q38MCQ5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q39MCQ5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q40MCQ5 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
- Q41MCQ5 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
- Q42MCQ5 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
- Q43MCQ5 Marks·Choose one option

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

- Ared and green
- Bred and blue
- Cgreen and yellow
- Dred and yellow
- Q45MCQ5 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
- Q46MCQ5 Marks·Choose one option

- AFirst line of each paragraph
- BAll blank lines
- CEntire file in one line
- DFirst field of each line
- Q47MSQ5 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
- Q48MSQ5 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"
- Q49MSQ5 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
- Q50MSQ5 Marks·Choose all correct options

- A

- B

- C

- D

- E

- A
- Q51MSQ5 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
- Q52NAT5 Marks·Write the number
Your answer: - Q53NAT5 Marks·Write the number
Your answer: - Q54NAT5 Marks·Write the number
Your answer: - Q55NAT5 Marks·Write the number
Your answer: - Q56NAT5 Marks·Write the number
Your answer:
End Term · 13 Apr 2025 (FN)End Term
- Q57MCQ7 Marks·Choose one option

- A

- B

- C

- D

- A
- Q58MCQ7 Marks·Choose one option
Schedule the script /home/user/backup.sh to meet the following requirements 1. The job should run at the 2nd minute of every hour, but only during weekdays (Monday to Friday). 2. Additionally, the job must not run during the first and last days of each month. 3. It should execute a script located at /home/user/backup.sh and log the output to /var/log/backup.log (append mode). Which of the following exact crontab entry is used to schedule this job.
- A

- B

- C

- D

- A
- Q59MCQ7 Marks·Choose one option
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.
- Q60MCQ7 Marks·Choose one option

- ADeletes all .log files in /home.
- BLists all .log files in /sample/logs.
- CFinds all .log files and backs them up.
- DRenames .log files to .bak in /home.
- Q61MCQ6 Marks·Choose one option
Select a single sed command to achieve the following. a) Find all lines that start with the word "error". b) Replace the word "error" with "warning" only on those lines. c) Append " - needs review" to the end of those same lines.
- A

- B

- C

- D

- A
- Q62MCQ6 Marks·Choose one option
Consider current_permissions contain the present permissions of a file. Which of the following shell script statement calculate the new permissions by removing the read permission?
- A

- B

- C

- D

- A
- Q63MCQ6 Marks·Choose one option
Select a command to find all established suspicious TCP connections on port 80 using netstat
- A

- B

- C

- D

- A
- Q64MCQ6 Marks·Choose one option
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
- Q65MCQ6 Marks·Choose one option

- A

- B

- C

- D

- A
- Q66MCQ6 Marks·Choose one option

- ADisplay the today’s date
- BNothing is printed
- Clist all the lines of file1 that do not match file2
- D0
- Q67MCQ6 Marks·Choose one option

- 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.
- Q68MCQ6 Marks·Choose one option

- 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.
- Q69MCQ6 Marks·Choose one option
You are working in a team with multiple developers using Git. One of your colleagues has created a feature branch from main, but over time, the main branch has received several commits. Your colleague is now attempting to merge the feature branch into main, but a conflict arises in a file that was modified both in the main branch and in the feature branch. How would you resolve the conflict, ensuring that the feature branch is up-to-date with the latest changes from main and that no work is lost? Additionally, how would you ensure that this situation is prevented in the future?
- Aa. Merge the feature branch into main without updating main. Resolve conflicts directly in the merge commit. b. Regularly merge main into the feature branch to avoid future conflicts.
- Ba. Switch to the feature branch and run git pull origin feature-branch. b. Resolve the conflict directly in main, then push the changes.
- Ca. Ensure main is up-to-date by pulling the latest changes. b. Switch to the feature branch and merge main into it. c. Resolve the conflicts, commit the changes, and push the feature branch. d. Merge the feature branch into main via a pull request. e. Prevent future conflicts by encouraging regular updates between branches.
- Da. Merge the feature branch into main without resolving conflicts. b. Use git reset to undo any conflicts and continue with the merge.
- Q70MSQ6 Marks·Choose all correct options

- A

- B

- C

- D

- E

- A
- Q71NAT6 Marks·Write the number
Your answer: - Q72NAT6 Marks·Write the number
Your answer:
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.