Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 03-29-2003, 07:01 AM   #1
Registered: Mar 2003
Location: Massachusetts, USA
Distribution: RH 8, Solaris, Windoze eXPunged
Posts: 520

Rep: Reputation: 30
Removing a directory

Hi all,

How can I remove a directory and all of it's sub-directories even if they are not empty? Thanks!

Old 03-29-2003, 07:09 AM   #2
Senior Member
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
rm -r dirname

But be careful. *g*

Or just use any file manager.

And, just cuz somebody would say it, always try man rm first.
Old 03-29-2003, 08:04 AM   #3
LQ Newbie
Registered: Mar 2003
Location: Iowa, US
Distribution: RedHat
Posts: 4

Rep: Reputation: 0
One more comment along this may also want to check your environment settings by entering "alias" at the prompt.
The "rm" command is often set to safe mode by aliasing "rm" to "rm -i" in interactive shells(reqiuiring confirmation for all removals.) Less frequently, it could be aliased to something more "dangerous" like "rm -f".


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing non-empty directory satimis Linux From Scratch 5 03-09-2009 05:58 AM
removing a directory swatward Linux - Newbie 5 05-19-2005 09:22 AM
removing one directory in PATH env chunlee Linux - Newbie 4 11-06-2004 08:50 PM
removing an entire directory pasalacqua128 Linux - Software 2 06-03-2004 05:37 PM
Removing a directory snowmonkey Linux - Software 3 11-06-2003 09:43 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:27 AM.

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