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! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-24-2005, 12:01 AM
|
#1
|
|
LQ Newbie
Registered: Jun 2005
Location: Agoura Hills, CA
Distribution: FC3
Posts: 17
Rep:
|
deleting directory w/o descending
how do i delete a directory without descending and having to delete every content inside. i tried doing 'prompt' and 'rm -r' but to no avail.
thanks 
|
|
|
|
08-24-2005, 12:22 AM
|
#2
|
|
Member
Registered: Dec 2003
Location: Next to Equator
Distribution: GNU/Linux 2.6.14
Posts: 382
Rep:
|
you can add a f to rm -r becoming rm -rf
|
|
|
|
08-24-2005, 12:33 AM
|
#3
|
|
Member
Registered: Jul 2003
Location: Santiago, Chile
Distribution: Gentoo
Posts: 282
Rep:
|
It is weird that rm -r does not just work, as newinlinux said try with rm -rf
|
|
|
|
08-24-2005, 01:35 AM
|
#4
|
|
Senior Member
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Rep:
|
|
|
|
|
08-24-2005, 07:46 AM
|
#5
|
|
Member
Registered: Oct 2004
Location: Germany
Distribution: Debian
Posts: 274
Rep:
|
<info>
some distros do an alias rm="rm -i" as default, for new users coming from windows...
normally these are in /etc/tcshrc.alias or /etc/profile or /etc/bashrc or whatever shell is in use...
</info>
|
|
|
|
08-24-2005, 08:39 AM
|
#6
|
|
Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,644
|
rm -r alone doesn't work because by default rm doesn't remove directories - only their contents and tells you it can't remove a directory because it is a directory. The -f flag says to disregard all warning conditions and force the remove.
As pointed out by others it is useful for removing an entire directory tree but can be very dangerous if you don't use it correctly.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 07:48 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|