Results 1 to 10 of 10
Is there a Linux equivalent for the DOS "DELTREE"? As far as I know, "rmdir" cannot remove non-empty directories....
- 02-03-2005 #1Linux Newbie
- Join Date
- Oct 2004
- Posts
- 139
Linux equivalent for "DELTREE"?
Is there a Linux equivalent for the DOS "DELTREE"? As far as I know, "rmdir" cannot remove non-empty directories.
- 02-03-2005 #2Linux User
- Join Date
- Jan 2005
- Location
- Arizona
- Posts
- 288
rm -r
man rm for detailsMichael Salivar
Man knows himself insofar as he knows the world, becoming aware of it only in himself, and of himself only within it.
--Goethe
- 02-03-2005 #3
It still may balk at you, so you may need to force remove:
As always, be *very* careful using this command, particularly as root.Code:rm -Rf directoryname
Registered Linux user #270181
TechieMoe's Tech Rants
- 02-03-2005 #4Linux Engineer
- Join Date
- Nov 2004
- Location
- Montreal, Canada
- Posts
- 1,271
Idd even say more then *very* be : VERY carefull...
Originally Posted by techieMoe \"Meditative mind\'s is like a vast ocean... whatever strikes the surface, the bottom stays calm\" - Dalai Lama
\"Competition ultimatly comes down to one thing... a loser and a winner.\" - Ugo Deschamps
- 02-03-2005 #5Linux User
- Join Date
- Jan 2005
- Location
- Arizona
- Posts
- 288
Yeah, it's surprisingly easy to delete things like, say, /etc.
One late night I was searching for my perfect terminal, and upon uninstalling one I went to remove dot files and check /etc for confs:
[root@demerzel ethyriel]# rm -R .footermls /etc
rm: cannot remove '.footermls': No such file or directory
Now why the hell would it tell me that?
Wait for it, wait for it...
I think they heard my screams in Santa Fe.
Everyone's made stupid mistakes like this at some point or another. To avoid them, you might look up libtrash.Michael Salivar
Man knows himself insofar as he knows the world, becoming aware of it only in himself, and of himself only within it.
--Goethe
- 02-05-2005 #6Linux Newbie
- Join Date
- Oct 2004
- Posts
- 139
Yeah, especially when "rm -r" does not even prompt.
Originally Posted by UgoDeschamps
- 02-05-2005 #7Linux User
- Join Date
- Jan 2005
- Location
- Arizona
- Posts
- 288
If what you want is a prompt try rm -ri, or you could make an alias to deltree or some such to do this automatically.
Michael Salivar
Man knows himself insofar as he knows the world, becoming aware of it only in himself, and of himself only within it.
--Goethe
- 02-05-2005 #8Yeah! when i use the
Originally Posted by UgoDeschamps command i type out what i want to remove first check it twice...then add theCode:rm -Rf
at the beginning of the line just so i cant go and royaly goof and rm the entire / directory if i happen to hit enter to soonCode:rm -Rf
P.s> this in me just comes from when i was 12years old and formatted a hdd with my schools entire newley put on puter records.....took all the students 4 months to complete....needless to say i was in the doghouse! and suspended.....now if the puter teacher cound of just of hooked up the tape backup~Mike ~~~ Forum Rules
Testing? What's that? If it compiles, it is good, if it boots up, it is perfect. ~ Linus Torvalds
http://loft306.org
- 02-05-2005 #9Linux Newbie
- Join Date
- Oct 2004
- Posts
- 139
Probably because it can't remove a file and a folder at the same time. You probably have to remove the file, then remove the folder.
Originally Posted by Ethyriel
- 02-05-2005 #10Linux User
- Join Date
- Jan 2005
- Location
- Arizona
- Posts
- 288
or because I forgot the semicolon
Originally Posted by user222
Michael Salivar
Man knows himself insofar as he knows the world, becoming aware of it only in himself, and of himself only within it.
--Goethe


Reply With Quote
