On Sun, Jun 29, 2003 at 01:55:37AM -0500, Julian Opificius wrote:
> Help, please,
>
> As a result of an unclean shutdown, I have some rogue files on my 7.2
> installation, which are preventing a complete boot up.
>
> Somehow I have files called "/dev/log" and "/var/loc" in a director in
> /var/log.
> Yes, the files have the forward slashes in them, and the OS is all
> confused, thinking they're directories when they're really not. I can't
> delete them or rename them using rm, or rmdir. I've tried chattr, but that
> won't touch them either.
You should be able to do something like:
rm -f "/var/log/dev\/log"
or even write a short C program similar to this (untested) code:
---------------- foo.c --------------
#include <stdio.h>
#include <unistd.h>
main (int argc, char ** argv)
{
if (argc == 2)
{
unlink (argv[1]);
}
return 0;
}
-----------------------
compile it:
cc -o foo foo.c
run it:
./foo "/var/log/dev\/log"
>
> During the boot process, the OS sees the unclean state, which causes fsck
> to run. Fsck fails to solve the problem, which causes the boot process to
> fail, dumping me into a diagnostic shell.
>
> I'm also getting Input/Output errors on a couple of pid files.
>
> Is there a utility I can use to clean this up?
>
> Many thanks.
>
> Julian.
>