Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how can I force a file to be deleted?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
tody4
n00b
n00b


Joined: 13 Sep 2005
Posts: 53

PostPosted: Wed Dec 21, 2005 4:32 pm    Post subject: how can I force a file to be deleted? Reply with quote

I have tried rm -dRf on a directory and I get directory is not empty. I have tried rm -f on the file in the directory, then a ls shows the file is still there. how can I get rid of it? I'm logged in as root.

TIA
Back to top
View user's profile Send private message
pilla
Bodhisattva
Bodhisattva


Joined: 07 Aug 2002
Posts: 7729
Location: Underworld

PostPosted: Wed Dec 21, 2005 4:54 pm    Post subject: Reply with quote

rm -rf ?
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
plasmagunman
l33t
l33t


Joined: 07 Jun 2002
Posts: 604
Location: berlin

PostPosted: Wed Dec 21, 2005 5:08 pm    Post subject: Reply with quote

do you get any error after doing rm -f on the file? if not i would propose a forced fsck, to check if the filesystem is still allright.
_________________
please, feel free to correct my english. - por favor, corrige mi español.
Back to top
View user's profile Send private message
tody4
n00b
n00b


Joined: 13 Sep 2005
Posts: 53

PostPosted: Wed Dec 21, 2005 5:11 pm    Post subject: Reply with quote

rm -f doesn't give an error and rm -rf doesn't give an error on the file itself. If I try rm -rf from the /usr/portage directory I get an error about the directory not being empty. How would I do a forced fsck?
Back to top
View user's profile Send private message
plasmagunman
l33t
l33t


Joined: 07 Jun 2002
Posts: 604
Location: berlin

PostPosted: Wed Dec 21, 2005 5:28 pm    Post subject: Reply with quote

tody4 wrote:
How would I do a forced fsck?

Code:
shutdown -F -r now
should work. (the "-F" stands for "Force fsck on reboot.") unfortunately it doesn't work on reiserfs (because the reiserfs-fsck-tool ignores the force-flag, so if you use reiserfs you have to boot from a live-cd and perform a
Code:
fsck /dev/WHATEVER_YOUR_DEVICE_IS_CALLED
on the unmounted partition. (or check that thread, dealing fsck.reiserfs-behaviour.)
_________________
please, feel free to correct my english. - por favor, corrige mi español.
Back to top
View user's profile Send private message
tody4
n00b
n00b


Joined: 13 Sep 2005
Posts: 53

PostPosted: Wed Dec 21, 2005 5:39 pm    Post subject: [solved] Reply with quote

Thanks for the help. I had to emerge the reiserfsprogs and then run fsck.reiserfs. It worked, the file had a bad hash and was cleared.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum