uiz Space

January 2026 term · System Commands · BSSE2001

System Commands End Term: 10 May 2026, Set 1-2 (January 2026 term)

The IIT Madras BS System Commands (System Commands) End Term paper sat on 10 May 2026, in the January 2026 term, set 1-2: 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.

Questions
20
Marks
100
Duration
180 min
MCQ
9
Numerical
6
MSQ
5

Updated

Official paper: System Commands 06 May 26 · No negative marking.

Question 1

+5 marksOne correct option
  1. A

    8:30 only on weekdays

  2. B

    8:30, 9:30, 10:30 only on weekdays

  3. C

    Every 30 minutes

  4. D

    Every hour

Show answer

Correct answer

  • B

    8:30, 9:30, 10:30 only on weekdays

Question 2

+5 marksOne correct option
  1. A

    2

  2. B

    3

  3. C

    5

  4. D

    4

Show answer

Correct answer

  • D

    4

Question 3

+5 marksOne correct option
  1. A

    31/12/2025

  2. B

    2025/12/31

  3. C

    12/31/2025

  4. D

    unchanged

Show answer

Correct answer

  • A

    31/12/2025

Question 4

+5 marksOne correct option
  1. A

    Removes duplicate lines

  2. B

    Sorts the file alphabetically

  3. C

    Reverses the order of lines

  4. D

    Deletes the last line

Show answer

Correct answer

  • C

    Reverses the order of lines

Question 5

+5 marksOne correct option
  1. A

    Split lines

  2. B

    Join all lines into one

  3. C

    Reverse lines

  4. D

    Delete the newline at the end

Show answer

Correct answer

  • B

    Join all lines into one

Question 6

+5 marksOne correct option

A system administrator writes the following shell script to test whether a remote host is reachable before initiating a backup process

The command sends 1 ICMP packet to the host 192.0.2.1 All output is redirected to /dev/null The script then prints the exit status of the previous command using $?
If the host is unreachable, what will be the output of the script?

  1. A

    0

  2. B

    1

  3. C

    2

  4. D

    depends

Show answer

Correct answer

  • B

    1

Question 7

+5 marksOne correct option

What is the output produced by the above script?

  1. A

    1

  2. B

    2

  3. C

    3

  4. D

    6

Show answer

Correct answer

  • C

    3

Question 8

+5 marksOne correct option

A system administrator creates the following script named cleanup.sh to prevent the application log file from growing too large :

If the file app.log initially contains 1800 lines, how many lines will remain after executing the script?

  1. A

    1000

  2. B

    1300

  3. C

    1800

  4. D

    500

Show answer

Correct answer

  • D

    500

Question 9

+5 marksOne correct option

A developer writes the following Bash script to process all .txt files present in the current working directory :

The script is executed in a directory that currently contains no .txt files.
What is the output produced after running the above script?

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • C

Question 10

+5 marksNumerical answer
Show answer

Correct answer: 4

Question 11

+5 marksNumerical answer

What is the output after executing the shell script

Show answer

Correct answer: 1

Question 12

+5 marksNumerical answer

A data engineer is given a file file.txt containing product names collected from multiple sources.
The file may contain: • Comment lines starting with # • Blank lines • Extra spaces • Repeated consecutive duplicate entries the contents of the file.txt are :

To clean this data, the engineer runs the sed script named s1_10.sed:

Show answer

Correct answer: 3

Question 13

+5 marksNumerical answer

A repository has:

How many total commits will exist after all merges?

Show answer

Correct answer: 21

Question 14

+5 marksOne or more correct options

After executing the following shell script

Which of the following statements are true?

Select all that apply.

  1. A

    total becomes the number of lines

  2. B

    total prints empty or 0

  3. C

    loop runs in a subshell

  4. D
Show answer

Correct answers

  • B

    total prints empty or 0

  • C

    loop runs in a subshell

Question 15

+5 marksOne or more correct options

Select all that apply.

  1. A

    First prints a.txt b.txt

  2. B

    First prints *.txt

  3. C

    Second prints *.txt

  4. D

    Second prints a.txt b.txt

Show answer

Correct answers

  • A

    First prints a.txt b.txt

  • C

    Second prints *.txt

Question 16

+5 marksOne or more correct options

Select all that apply.

  1. A

    abab

  2. B

    abba

  3. C

    abcabc

  4. D

    none

Show answer

Correct answers

  • A

    abab

  • C

    abcabc

Question 17

+5 marksOne or more correct options

Consider the files f1 and f2 with their content
File f1 with content :

File f2 with content :

Select all that apply.

  1. A

    Total output lines = 4

  2. B

    Total output lines = 5

  3. C

    First line of f2 prints 3 1

  4. D

    First line of f2 prints 3 3

  5. E

    NR continues counting across files

  6. F

    FNR resets for each file

Show answer

Correct answers

  • A

    Total output lines = 4

  • C

    First line of f2 prints 3 1

  • E

    NR continues counting across files

  • F

    FNR resets for each file

Question 18

+5 marksOne or more correct options

Which commands can create a new branch reference?

Select all that apply.

  1. A

    git branch new

  2. B

    git checkout -b new

  3. C

    git reset --hard HEAD~1

  4. D

    git switch -c new

  5. E

    git clone

Show answer

Correct answers

  • A

    git branch new

  • B

    git checkout -b new

  • D

    git switch -c new

Question 19

+5 marksNumerical answer

Consider the following data to answer the given subquestions.
The employees.txt file contains the following data:

The attendance.txt file contains the following data:

And the script report.awk is :

How many employees receive bonuses?

Show answer

Correct answer: 3

Question 20

+5 marksNumerical answer

Consider the following data to answer the given subquestions.
The employees.txt file contains the following data:

The attendance.txt file contains the following data:

And the script report.awk is :

The Value of the absent variable is?

Show answer

Correct answer: 2