arrow
arrow
arrow
Which Linux command is used to delete files or directories?
Question



Which Linux command is used to delete files or directories?

A.

rm

B.

del

C.

erase

D.

remove

E.

None of the above

Correct option is A

The rm command in Linux is used to delete files or directories. It is a standard command-line utility that removes files or directories specified as arguments.
Important Key Points:
1. The rm command can delete both files and directories. For directories, the -r or --recursive flag is used.
2. Using rm with caution is important, as deleted files are not moved to a trash bin and cannot be easily recovered.
3. Example:
· To delete a file: rm file_name
· To delete a directory: rm -r directory_name
Knowledge Booster:
· Option (b): del is a command used in Windows, not Linux, for deleting files.
· Option (c): erase is not a valid command in Linux for deletion.
· Option (d): remove is not a valid Linux command; the correct command is rm.

Free Tests

Free
Must Attempt
Video Solutions

RBI Assistant Pre 2026 Full Mock Test -01

languageIcon English
  • pdpQsnIcon100 Questions
  • pdpsheetsIcon100 Marks
  • timerIcon60 Mins
languageIcon English
Free
Must Attempt
Video Solutions

RBI Asst Prelims 2026 : Reasoning Section Test 01

languageIcon English
  • pdpQsnIcon35 Questions
  • pdpsheetsIcon35 Marks
  • timerIcon20 Mins
languageIcon English
Free
Must Attempt
Video Solutions

RBI Asst Prelims 2026 : Quant Section Test 01

languageIcon English
  • pdpQsnIcon35 Questions
  • pdpsheetsIcon35 Marks
  • timerIcon20 Mins
languageIcon English
test-prime-package

Access ‘IBPS RRB SO IT Officer (Scale-II)’ Mock Tests with

  • 60000+ Mocks and Previous Year Papers
  • Unlimited Re-Attempts
  • Personalised Report Card
  • 500% Refund on Final Selection
  • Largest Community
students-icon
368k+ students have already unlocked exclusive benefits with Test Prime!
Our Plans
Monthsup-arrow