View previous topic :: View next topic |
Author |
Message |
Banzai_san n00b
Joined: 02 May 2003 Posts: 50
|
Posted: Mon Sep 06, 2004 1:16 pm Post subject: Cannot delete files... |
|
|
hi,
Im having problem deleting these 2 files.
in directory
/var/tmp/portage/xorg-x11-6.7.0/work/xc/fonts/bdf/75dpi
when I do #ls
I get,
lubI19-ISO8859-1ISO8859- lutBS19-ISO8859-3.pcf.gz
when I do #ls -l
I get,
ls: lubI19-ISO8859-1ISO8859-: No such file or directory
ls: lutBS19-ISO8859-3.pcf.gz: No such file or directory
total 0
when I tried to #rm *
I get,
rm: cannot remove `lubI19-ISO8859-1ISO8859-': No such file or directory
rm: cannot remove `lutBS19-ISO8859-3.pcf.gz': No such file or directory
Is there any way to delete those 2 files?
Thanks |
|
Back to top |
|
|
oberyno Guru
Joined: 15 Feb 2004 Posts: 467 Location: /bin/zsh
|
Posted: Mon Sep 06, 2004 1:19 pm Post subject: |
|
|
You probably need to do a fsck.
Code: | fsck.<your filesystem> |
Make sure you umount the filesystem first. If it's your root partition, fsck from the livecd. |
|
Back to top |
|
|
Regor Guru
Joined: 06 Aug 2002 Posts: 545 Location: 39° 2' 48" N, 120° 59' 2" W
|
Posted: Tue Sep 07, 2004 1:20 am Post subject: |
|
|
It's only because the filename has a space in it. Put quotes around it to delete.
Code: | rm "lubI19-ISO8859-1ISO8859- lutBS19-ISO8859-3.pcf.gz" |
_________________ Sometimes the appropriate response to reality is to go insane.
-Philip K. Dick, Valis |
|
Back to top |
|
|
Banzai_san n00b
Joined: 02 May 2003 Posts: 50
|
Posted: Tue Sep 07, 2004 1:42 am Post subject: |
|
|
I tried
#rm "lubI19-ISO8859-1ISO8859- lutBS19-ISO8859-3.pcf.gz"
and got this
rm: cannot remove `lubI19-ISO8859-1ISO8859- lutBS19-ISO8859-3.pcf.gz': No suchfile or directory
Ive not tried fsck.reiserfs yet. Looks a little complex |
|
Back to top |
|
|
Regor Guru
Joined: 06 Aug 2002 Posts: 545 Location: 39° 2' 48" N, 120° 59' 2" W
|
Posted: Tue Sep 07, 2004 6:55 am Post subject: |
|
|
It looks like there could be more than one space there, try 2 or 3 and see if that helps. _________________ Sometimes the appropriate response to reality is to go insane.
-Philip K. Dick, Valis |
|
Back to top |
|
|
SZwarts l33t
Joined: 13 Oct 2003 Posts: 629 Location: Sydney, NSW, Australia
|
Posted: Tue Sep 07, 2004 7:03 am Post subject: |
|
|
since it is in a tmp dir you're probably trying to erase the entire directory (tree)?
If that's the case just go to the level from where you start deleting and do a rm -rf directory.
Alternately in cases like this is quite easy to do this from a graphical user interface if available, like from konqueror. _________________ only when it is dark enough, can you see the stars |
|
Back to top |
|
|
oberyno Guru
Joined: 15 Feb 2004 Posts: 467 Location: /bin/zsh
|
Posted: Tue Sep 07, 2004 8:20 am Post subject: |
|
|
Banzai_san wrote: | Ive not tried fsck.reiserfs yet. Looks a little complex | Not really. Just unmount the filesystem, then run fsck.reiserfs /dev/hda2 or whatever device has your /var on it. If it's your root partition, use fsck.reiserfs from the livecd. If anything else is necessary, fsck.reiserfs will post a message saying what else to do.
In your first post, you used a glob (*) to remove all the files in the directory and it didn't work. To me that says there is something wrong with the filesystem. Globbing would have taken care of any weird spacing issues. Call it a hunch, but I don't think removing a higher directory will remove those two(one?) files either. Although you should try that before the filesystem check. /var/tmp/portage is safe to delete as long as there is not a compile in progress. |
|
Back to top |
|
|
Banzai_san n00b
Joined: 02 May 2003 Posts: 50
|
Posted: Tue Sep 07, 2004 9:10 am Post subject: |
|
|
Yes, I used * to remove all the files in the dir and it didnot work.
I tried using the -f to force it to delete and it didnt work too. Tried deleting higher directory (using konqueror) and got as similar errmsg that it cant delete.
I'll try fsck.reiseerfs /dev/hda11 . Its just that I get msg telling me that its busy when trying to umount. I guess I have to use the liveCD. Only thing is that my liveCD is an old 2004.0 release. The reiserfsprogs I think is old, and Im using the latest reiserfsprogs-3.6.18. Will there be any problem fsck-ing my /dev/hda11 (ie /var ) ?
Thanks in advance for all your assistance. |
|
Back to top |
|
|
oberyno Guru
Joined: 15 Feb 2004 Posts: 467 Location: /bin/zsh
|
Posted: Tue Sep 07, 2004 9:25 am Post subject: |
|
|
You could try umount -l. Anyway, that might not work perfectly as /var probably has a lot of daemons trying to access pid files and such. I'm not sure if an old livecd would do any harm.
It might be a good idea to boot in to single user mode and run fsck from there. You can get into single user mode by rebooting and appending "single" without quotes to the end of your kernel line in grub. That's probably going a little overboard though. Personally, I would just use umount -l. |
|
Back to top |
|
|
Banzai_san n00b
Joined: 02 May 2003 Posts: 50
|
Posted: Tue Sep 07, 2004 12:04 pm Post subject: |
|
|
Hi again.
I tried umount -l /dev/hda11 (ie /var ) and manage to unmount it.
then I ran
#fsck.reiserfs /dev/hda11 and I get this msg
--------------------------------------------------------
###########
reiserfsck --check started at Tue Sep 7 20:00:05 2004
###########
Replaying journal..
Trans replayed: mountid 341, transid 181582, desc 5818, len 12, commit 5831, next
t trans offset 5814
Trans replayed: mountid 341, transid 181583, desc 5832, len 5, commit 5838, next
trans offset 5821
Trans replayed: mountid 341, transid 181584, desc 5839, len 23, commit 5863, next
----- 8< --- snip --- 8< -----
rans replayed: mountid 341, transid 181632, desc 6244, len 1, commit 6246, next trans offset 6229
Reiserfs journal '/dev/hda11' in blocks [18..8211]: 51 transactions replayed
Checking internal tree../ 19 (of 119)/ 2 (of 145)bad_directory_item: block 324402: The directory item [57831 58243 0x1 DIR (3)] has a not properly hashed entry (2)
bad_leaf: block 324402, item 8: The corrupted item found (57831 58243 0x1 DIR (3), len 128, location 3416 entry count 4, fsck need 0, format old)
finished
Comparing bitmaps..finished
Fatal corruptions were found, Semantic pass skipped
1 found corruptions can be fixed only when running with --rebuild-tree
###########
reiserfsck finished at Tue Sep 7 20:00:23 2004
----------------------------------------------------------
What should I do now? |
|
Back to top |
|
|
oberyno Guru
Joined: 15 Feb 2004 Posts: 467 Location: /bin/zsh
|
Posted: Tue Sep 07, 2004 12:14 pm Post subject: |
|
|
Banzai_san wrote: |
Checking internal tree../ 19 (of 119)/ 2 (of 145)bad_directory_item: block 324402: The directory item [57831 58243 0x1 DIR (3)] has a not properly hashed entry (2)
bad_leaf: block 324402, item 8: The corrupted item found (57831 58243 0x1 DIR (3), len 128, location 3416 entry count 4, fsck need 0, format old)
finished
Comparing bitmaps..finished
Fatal corruptions were found, Semantic pass skipped
1 found corruptions can be fixed only when running with --rebuild-tree
###########
reiserfsck finished at Tue Sep 7 20:00:23 2004
----------------------------------------------------------
What should I do now? | Just rerun fsck.reiserfs like this: Code: | fsck.reiserfs --rebuild-tree /dev/hda11 | It won't harm anything. Most likely your computer had a hard reboot and reiserfs's journalling was not able to handle the problem.
FYI, this is the kind of error that reiser4 is supposed to fix with it's atomic approach rather than journaled. Not that you should convert to reiser4 as it still needs more testing. |
|
Back to top |
|
|
Banzai_san n00b
Joined: 02 May 2003 Posts: 50
|
Posted: Tue Sep 07, 2004 1:05 pm Post subject: |
|
|
Thanks oberyno. That did the trick.
Now, when I do
#ls -l /var/tmp/portage/xorg-x11-6.7.0/work/xc/fonts/bdf/75dpi
I get
total 0
Thanks again to all. Learned a few new things. Cool. |
|
Back to top |
|
|
|