Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-17-2005, 06:27 PM   #1
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.
Old 05-17-2005, 06:41 PM   #2
Registered: Mar 2004
Location: Netherlands
Distribution: Debian
Posts: 729

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

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

Original Poster
Rep: Reputation: 15
ahh. thays easy, ty....
Old 05-18-2005, 09:35 AM   #5
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, 09:22 AM   #6
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.


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 05:58 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
Removing a directory WorldBuilder Linux - General 2 03-29-2003 08:04 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:51 PM.

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