Author Topic: Easy Way to Delete Folders in Linux  (Read 4111 times)

0 Members and 1 Guest are viewing this topic.

Offline Donald Darden

  • Sr. Member
  • ****
  • Posts: 363
  • User-Rate: +3/-13
Easy Way to Delete Folders in Linux
« on: November 24, 2007, 11:08:42 PM »
The rm command can be used to delete files or folders, but balks at deleting folders with subfolders or files still within them.  However, if you check the switches that you can use with rm, you will find that -r allows it to recursively go through all the subfolders, and -f will force a delete for each item found.  So using rm -r -f and giving a folder name will get rid of it without fanfare.  You could also use the alias command to create a special instruction, say rmdir, to remember this for you.