Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-22-2005, 01:14 PM   #1
Registered: Apr 2005
Distribution: Gentoo
Posts: 44

Rep: Reputation: 15
How do I delete a folder and everything in it?

How do I delete a folder and everything in it?How do I delete a folder and everything in it? Along with the command that asks me if I really wanted to delete it for sure.
Old 04-22-2005, 01:26 PM   #2
Registered: Aug 2003
Location: Omaha, NE, USA
Distribution: PCLinuxOS 2007
Posts: 808

Rep: Reputation: 30
"man rm"
Old 04-22-2005, 01:26 PM   #3
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666

Rep: Reputation: 30
rm -rf /directory
Old 04-22-2005, 02:03 PM   #4
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276

Rep: Reputation: 33
Originally posted by harken
rm -rf /directory
That is exactly right, of course, but be very careful with that command--especially if you use it as root. It is a good idea to rely on tab completion with that cause an accidental space in the directory tree will make you cry. For example:

rm -rf / home/YOU

Could be really bad (notice the space between the / and home)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
seems like I delete my /etc folder. bladehaze Debian 9 09-12-2005 11:47 AM
Unable to delete folder arctuniol Red Hat 2 10-11-2004 02:07 PM
delete source folder? machiner Linux - Software 2 07-27-2004 03:37 PM
I just delete the /lib folder :( Boogieman Linux - Software 8 07-13-2004 05:06 PM
How to delete the whole folder without being prompted anything conkhikho Linux - Newbie 1 10-27-2003 01:57 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:08 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration