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-20-2005, 02:27 PM   #1
Waerner
Member
 
Registered: May 2005
Location: Írebro, Sweden
Distribution: Ubuntu 6.06
Posts: 92

Rep: Reputation: 15
Folders unable to be deleted?


Hi, I made a successfull compile of DCLib and Valknut DC++, but two folders with their name, were I first extracted them, are unable to be deleted. It says (Translated from Swedish):

Access denied to /home/linus/Desktop/Recycle bin/dclib/ChangeLog.

Abort - Skip - Skip Automatically.

Then the folder disappear, but when I refresh the root-folder it was located in, it's still there. That makes me wonder if it's being recreated of if it just doesn't disappear.
So what can be behind this kind of problem? I tried to search for a Delete-command in the Terminal, so I could log in as root and delete them that way, but I didn't succeed with that.
And btw, the app that the source codes are there for isn't running at all.

Cheers
 
Old 05-20-2005, 02:35 PM   #2
ksgill
Senior Member
 
Registered: Apr 2003
Location: Toronto, Canada
Distribution: Ubuntu Jaunty (9.04)
Posts: 1,044

Rep: Reputation: 45
log in as root in terminal by using su -
and then delete the folder by doing:

rm -r /path/to/folder
 
Old 05-20-2005, 02:48 PM   #3
Waerner
Member
 
Registered: May 2005
Location: Írebro, Sweden
Distribution: Ubuntu 6.06
Posts: 92

Original Poster
Rep: Reputation: 15
I guess I'm the big n00b once again... But:

[root@localhost linus]# rm -d /home/linus/dclib/
rm: kan inte ta bort katalog "/home/linus/dclib/": Is a directory


"kan inte ta bort katalog" = "unable to delete folder"


Edit:
I tried the -r parameter first, but had to confirm everything, but perhaps that's the way you mean it should be done?



Edit 2:
Okay, I tried the -r and confirmed every single file, and it worked
Thanks alot for the help mate


Cheers

Last edited by Waerner; 05-20-2005 at 02:55 PM.
 
Old 05-20-2005, 03:10 PM   #4
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
Code:
rm -fr /path/to/folder
That can be VERY dangerous, but it will destroy everything in the directory listed and below it, and the -f option is for force, it won't ask you questions about the files, it is a 1 step removal. Be really careful with it, rm -rf in the wrong place is a dead system. I did that once, and I never want to do it again!

Peace,
JimBass
 
Old 05-20-2005, 03:40 PM   #5
ksgill
Senior Member
 
Registered: Apr 2003
Location: Toronto, Canada
Distribution: Ubuntu Jaunty (9.04)
Posts: 1,044

Rep: Reputation: 45
That's how you remove a directory and its contents- is there a safe way of deleting a directory? Ofcourse, if you rm -rf / as root, it will give you a dead system
 
Old 05-27-2005, 02:07 PM   #6
Waerner
Member
 
Registered: May 2005
Location: Írebro, Sweden
Distribution: Ubuntu 6.06
Posts: 92

Original Poster
Rep: Reputation: 15
lol, great dudes
I love this forum, nice people helping n00bs like me =D
Thanks alot
 
Old 05-27-2005, 04:35 PM   #7
qwerty
Member
 
Registered: Feb 2005
Location: England
Distribution: Ubuntu 5.10
Posts: 80

Rep: Reputation: 15
I think if you use

Code:
rm /path/to/directory/*
that will delete all of the files in the directory

and then you should be able to use

Code:
rmdir /path/to/directory/
to remove the empty folder. You made need to be root to do this or change the permissions of the directory ( chmod u+w ...)
 
Old 05-27-2005, 06:59 PM   #8
Genesee
Member
 
Registered: Dec 2002
Distribution: Slackware
Posts: 927

Rep: Reputation: 30
rmdir won't let you remove a dir with contents, you can override that using "rm -Rf" - as JimBass said, be careful with that

also, you should alias "rm" to "rm -i", at least for root, which will ask you to confirm that you do actually want to completely remove. that has saved me more than once
 
  


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
Deleted the wrong folders Thanotos Linux - Newbie 8 11-07-2005 07:30 AM
Deleted the wrong folders Thanotos Slackware 3 11-02-2005 09:48 AM
deleted linux partition adn the boot loader was deleted also,now i have only gnu grub boris199 Linux - Laptop and Netbook 2 01-29-2005 04:53 PM
retriving deleted files and folders nayabingi Linux - General 2 09-27-2004 10:26 AM
unable to remove files/folders timsch75 Linux - Software 2 03-01-2004 11:01 AM


All times are GMT -5. The time now is 02:51 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration