Jose's Read Only Forum 2023

IT-Consultant: Charles Pegge => Other PC OS Distributions => General Linux Tips, Links, Comments => Topic started by: Donald Darden on November 24, 2007, 11:08:42 PM

Title: Easy Way to Delete Folders in Linux
Post by: Donald Darden 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.