View previous topic :: View next topic |
Author |
Message |
BWoso l33t
Joined: 31 Dec 2003 Posts: 920 Location: Cleveland Ohio, USA
|
Posted: Thu Feb 15, 2007 6:25 am Post subject: Cannot move or delete a particular file [Solved] |
|
|
I have a file on my computer which is causing some problems.
Code: | clear ~ # ls /usr/portage/metadata/cache/app-admin/ -lash
ls: cannot access /usr/portage/metadata/cache/app-admin/gnome-System-tools-1.0.2-r1: No such file or directory
total 0
0 drwxrwxr-x 2 root root 96 Feb 15 00:40 .
0 drwxrwxr-x 3 root root 80 Feb 15 00:40 ..
? ?????????? ? ? ? ? ? gnome-System-tools-1.0.2-r1
clear ~ # rm -v /usr/portage/metadata/cache/app-admin/gnome-System-tools-1.0.2-r1
rm: cannot remove `/usr/portage/metadata/cache/app-admin/gnome-System-tools-1.0.2-r1': No such file or directory
clear ~ # unlink /usr/portage/metadata/cache/app-admin/gnome-System-tools-1.0.2-r1
unlink: cannot unlink `/usr/portage/metadata/cache/app-admin/gnome-System-tools-1.0.2-r1': No such file or directory
|
I don't know how to delete a file other than using rm, but hopefully there is a way to fix this. The only reason I am worried about it is because emerge --sync will not complete with this file acting the way it is.
Thanks in advance for any help. _________________ I think that the forums are the greatest thing about Gentoo, thanks to everyone that posts on them!
The best way to cheer yourself up is to try to cheer somebody else up.
-Mark Twain-
Last edited by BWoso on Tue Feb 20, 2007 3:53 am; edited 1 time in total |
|
Back to top |
|
|
desultory Bodhisattva
Joined: 04 Nov 2005 Posts: 9410
|
Posted: Thu Feb 15, 2007 6:46 am Post subject: |
|
|
Use the appropriate fsck to check and repair the filesystem one which that file resides, after that has been handled the file should be deletable. |
|
Back to top |
|
|
BWoso l33t
Joined: 31 Dec 2003 Posts: 920 Location: Cleveland Ohio, USA
|
Posted: Thu Feb 15, 2007 6:59 am Post subject: |
|
|
Is there any way to fsck my root partition (the one the file is on) without booting to a live cd?
I understand I need to have the partition mount read only, so I'd assume booting to a cd is the only way since it's my root partition which needs checked. _________________ I think that the forums are the greatest thing about Gentoo, thanks to everyone that posts on them!
The best way to cheer yourself up is to try to cheer somebody else up.
-Mark Twain- |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9555 Location: beyond the rim
|
Posted: Thu Feb 15, 2007 10:23 am Post subject: |
|
|
You could also boot with init=/bin/bash as kernel argument, then the root partition will be mounted read-only. Or use single-user mode and run
Code: | mount -o remount,ro / | (though that only works if no files are opened for writing). |
|
Back to top |
|
|
BWoso l33t
Joined: 31 Dec 2003 Posts: 920 Location: Cleveland Ohio, USA
|
Posted: Tue Feb 20, 2007 3:53 am Post subject: |
|
|
I finally got around to making a knoppix boot CD so I could do this. I ran reiserfsck on the partition and it told me to run with the --rebuild-tree option. This really sucked since I don't have the space to back a backup, but I ran it anyway. It found more mistakes than the one that I found, and now everything is fixed. Thanks for the help. It's so amazing to see emerge --sync finish and not complain at all. _________________ I think that the forums are the greatest thing about Gentoo, thanks to everyone that posts on them!
The best way to cheer yourself up is to try to cheer somebody else up.
-Mark Twain- |
|
Back to top |
|
|
|