Linux Basics

You are currently auditing this course.
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.

Loading comments...