LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 05-17-2005, 05:27 PM   #1
swatward
Member
 
Registered: Jan 2005
Distribution: slackware
Posts: 83

Rep: Reputation: 15
removing a directory


[root@localhost html]# rm -d guest
rm: remove directory `guest'? yes
rm: cannot remove directory `guest': Is a directory
[root@localhost html]#

Theres probably an easy way to fix this, but its not working, and its a big file with a lot of tiny seperate files, so -r is annoying to do. Thanks, any help would be appreciated.
--brad
 
Old 05-17-2005, 05:41 PM   #2
Moloko
Member
 
Registered: Mar 2004
Location: Netherlands
Distribution: Debian
Posts: 729

Rep: Reputation: 30
rm -rf dir/
 
Old 05-17-2005, 05:46 PM   #3
rstewart
Member
 
Registered: Feb 2005
Location: Sunnyvale, CA
Distribution: Ubuntu
Posts: 205

Rep: Reputation: 38
rm -rf guest
 
Old 05-17-2005, 08:12 PM   #4
swatward
Member
 
Registered: Jan 2005
Distribution: slackware
Posts: 83

Original Poster
Rep: Reputation: 15
ahh. thays easy, ty....
 
Old 05-18-2005, 08:35 AM   #5
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
Use that command with care. Use it wrongly and you can hose your entire system.
 
Old 05-19-2005, 08:22 AM   #6
fiservguy
Member
 
Registered: Nov 2004
Distribution: RHEL 2.1, RHEL 3.0, SUSE 9.2
Posts: 31

Rep: Reputation: 16
rm -rf <name> means "remove <name>, and everything in <name> if it's a directory, recursively, and don't ask me to confirm anything."

rmdir <name> means "remove the directory <name>, but only if it's empty.

To remove a directory and all its contents, the former is probably the easiest. But use sparingly.
 
  


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 Off
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 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
Removing a directory WorldBuilder Linux - General 2 03-29-2003 07:04 AM


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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration