Question 168Asked in DSSSB TGT Computer Science, 25 Jun 2023, Shift 1 (8:30 AM)

What will be the output of the Linux shell command 'rm doc*'?

  1. AErase all files beginning with the pattern 'doc'
  2. BErase all files ending with the pattern 'doc'
  3. CList filenames ending with the pattern 'doc'
  4. DList filenames beginning with the pattern 'doc'
Show answerHide answer

Correct answer: (A) Erase all files beginning with the pattern 'doc'

Explanation

In doc* the * matches any characters, so rm doc* deletes all files whose names begin with 'doc'.

From DSSSB TGT Computer Science PYQ, 25 Jun 2023, Shift 1 (8:30 AM)

This is question 168 of DSSSB TGT Computer Science PYQ, 25 Jun 2023, Shift 1 (8:30 AM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.