LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 03-29-2003, 06:01 AM   #1
WorldBuilder
Member
 
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!

Chris
 
Old 03-29-2003, 06:09 AM   #2
slakmagik
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, 07:04 AM   #3
theklink
LQ Newbie
 
Registered: Mar 2003
Location: Iowa, US
Distribution: RedHat
Posts: 4

Rep: Reputation: 0
One more comment along this line...you 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".
 
  


Reply


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 04:58 AM
removing a directory swatward Linux - Newbie 5 05-19-2005 08:22 AM
removing one directory in PATH env chunlee Linux - Newbie 4 11-06-2004 07:50 PM
removing an entire directory pasalacqua128 Linux - Software 2 06-03-2004 04:37 PM
Removing a directory snowmonkey Linux - Software 3 11-06-2003 08:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:22 AM.

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