LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-22-2004, 04:37 PM   #1
granatica
LQ Newbie
 
Registered: May 2003
Posts: 16

Rep: Reputation: 0
Cannot remove directory, een with rm -fR


Slackware 10

I have a directory on a ReiserFS that I cannot delete. I try the command:

rm -fR /xdata/backup.20041006

and get:

rm: cannot remove directory `/xdata/backup.20041006/var/log/packages': Directory not empty

I try to:

ls /xdata/backup.20041006/var/log/packages

and get:

/usr/bin/ls: /xdata/backup.20041006/var/log/packages/kdebindings-3.1.4-i486-1: No such file or directory

I try going in to the directory and deleting the ghost file like so:

cd /xdata/backup.20041006/var/log/packages

rm kdebindings-3.1.4-i486-1

and get:

rm: cannot remove `kdebindings-3.1.4-i486-1': No such file or directory

Anyone seen this before? Anyone got any ideas?

Thanks!

Jason
 
Old 11-22-2004, 04:44 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
i had a similar problem recently where i was always refused permissions to delete or even stat a few files on a reiser fs. in the end i had to use reiserfsck to rebuild the whole tree db, it recognised the fat entries weer false, and removed them... worth a try if all else fails.
 
Old 11-22-2004, 04:50 PM   #3
zajelo3
Member
 
Registered: Mar 2004
Location: Central Florida
Distribution: Gentoo & Fedora
Posts: 153

Rep: Reputation: 30
I looked at the manpage for rm and maybe the -d option will help. Something like "rm -d /directoryname" or "rm -df /directoryname. Just a thought, I've never had the problem before.
 
Old 11-23-2004, 10:25 AM   #4
granatica
LQ Newbie
 
Registered: May 2003
Posts: 16

Original Poster
Rep: Reputation: 0
Got it!

Hey all, thanks for the help! I wound up doing a reiserfsck on the partition and it corrected errors. Then I was able to rm -fR the directory, whoo-hoo!!!
 
  


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
rm: cannot remove directory `ff': Directory not empty blancs Linux - General 17 08-29-2011 01:47 PM
Remove a Directory browser Linux - Newbie 8 08-11-2005 08:28 AM
help how to remove directory blackman890 Mandriva 6 11-09-2004 06:06 PM
how to remove a directory Meatball1337 Linux - Software 2 10-10-2004 09:39 AM
Remove a Directory RedHatMN Linux - Newbie 2 12-05-2001 02:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:28 AM.

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
Open Source Consulting | Domain Registration