Enrollments closing soon for Post Graduate Certificate Program in Applied Data Science & AI By IIT Roorkee | 3 Seats Left

  Apply Now

Linux Basics

21 / 107

Delete a file

To delete a file you can use rm command like:

rm file_name(s)

For deleting directories we have to use -r option with the command.

Also, to delete all files of a particular extension, we can replace file_name with *extension. So, to delete all txt files in a directory, we can use rm *.txt

INSTRUCTIONS
  • Type cd ~ command to go to your home directory
  • Delete the directory z/y/x created in the previous question.


Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...