Quiz Space

May 2023 term · System Commands · BSSE2001

System Commands End Term: 3 September 2023, Set QPD1-S1 (May 2023 term)

The IIT Madras BS System Commands (System Commands) End Term paper sat on 3 Sept 2023, in the May 2023 term, set QPD1-S1: 15 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
15
Marks
100
Duration
180 min
MCQ
6
MSQ
6
Written
3

Updated

Official paper: IIT M DIPLOMA ET1 EXAM QPD1 S2 03 Sep · No negative marking.

Question 1

+6 marksOne correct option

Select the correct statement from the options for the following command.

  1. A

    The command opens the file named "cat" in the current working directory.

  2. B

    The command takes standard input and prints the received standard input.

  3. C

    The command prints the contents of the file names obtained from the standard input

  4. D

    The command throws an error since no argument is given to the command ˋcatˋ in ˋ$(cat)ˋ

Show answer

Correct answer

  • C

    The command prints the contents of the file names obtained from the standard input

Question 2

+6 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • B

Question 3

+6 marksOne correct option

Which of the option is the correct output of the following command?

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

Correct answer

  • D

Question 4

+6 marksOne correct option

In a text file named "numbers.txt", multiple lines contain numbers. You want to delete all lines that have a number greater than 100. Which sed command would you use?
Hint: By default, SED uses the Basic Regular Expression Engine (BRE)

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

Correct answer

  • A

Question 5

+6 marksOne correct option

Select the correct statement from the options for the following SED command.

  1. A

    All characters in every fifth line of the text are capitalized

  2. B

    Starting character of every fifth line is capitalized

  3. C

    Starting character of each word is capitalized

  4. D

    Starting character of each word of every fifth line is capitalized

Show answer

Correct answer

  • D

    Starting character of each word of every fifth line is capitalized

Question 6

+6 marksOne correct option
  1. A

    4th of each Month at 00:04 am

  2. B

    4th of each Month at 04:00 am

  3. C

    4th Month of each year at 04:00 am

  4. D

    4th Month of each year at 00:04 am

Show answer

Correct answer

  • B

    4th of each Month at 04:00 am

Question 7

+6 marksOne or more correct options

Select all that apply.

  1. A

    1

  2. B

    2

  3. C

    3

  4. D

    4

  5. E

    None of these

Show answer

Correct answer

  • E

    None of these

Question 8

+6 marksOne or more correct options

Select all that apply.

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

Correct answers

  • B
  • D

Question 9

+7 marksOne or more correct options

Select all that apply.

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

Correct answers

  • A
  • B

Question 10

+8 marksOne or more correct options

Choose the corner case(s) from stdin that makes this SED command fail to replace all the three- character month names with the corresponding numbers.

Select all that apply.

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

Correct answers

  • C
  • D

Question 11

+8 marksOne or more correct options

Select all that apply.

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

Correct answers

  • B
  • C

Question 12

+8 marksOne or more correct options

Select all that apply.

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

Correct answers

  • A
  • D

Question 13

+7 marksWritten answer
Show answer

Correct answer: .tar

Question 14

+7 marksWritten answer

Based on the above data, answer the given subquestions.

What is the output of the first loop at the end of the execution of the given script?

Show answer

Correct answer: 123432112343211234321

Question 15

+7 marksWritten answer

Based on the above data, answer the given subquestions.

What will be the output of the second loop after the execution of the given script?

Show answer

Correct answer: 111222333444333222111