View previous topic :: View next topic |
Author |
Message |
tody4 n00b
Joined: 13 Sep 2005 Posts: 53
|
Posted: Wed Dec 21, 2005 4:32 pm Post subject: how can I force a file to be deleted? |
|
|
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 |
|
|
pilla Bodhisattva
Joined: 07 Aug 2002 Posts: 7729 Location: Underworld
|
Posted: Wed Dec 21, 2005 4:54 pm Post subject: |
|
|
rm -rf ? _________________ "I'm just very selective about the reality I choose to accept." -- Calvin |
|
Back to top |
|
|
plasmagunman l33t
Joined: 07 Jun 2002 Posts: 604 Location: berlin
|
Posted: Wed Dec 21, 2005 5:08 pm Post subject: |
|
|
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 |
|
|
tody4 n00b
Joined: 13 Sep 2005 Posts: 53
|
Posted: Wed Dec 21, 2005 5:11 pm Post subject: |
|
|
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 |
|
|
plasmagunman l33t
Joined: 07 Jun 2002 Posts: 604 Location: berlin
|
Posted: Wed Dec 21, 2005 5:28 pm Post subject: |
|
|
tody4 wrote: | How would I do a forced fsck? |
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 |
|
|
tody4 n00b
Joined: 13 Sep 2005 Posts: 53
|
Posted: Wed Dec 21, 2005 5:39 pm Post subject: [solved] |
|
|
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 |
|
|
|