Re: How to kill a dir?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 5 Jan 2004, "jdow" <jdow@xxxxxxxxxxxxx> wrote:
>Subject: Re: How to kill a dir?
>
>From: "Felipe Alfaro Solana" <felipe_alfaro@xxxxxxxxxxxxx>
>
>> On Mon, 2004-01-05 at 19:09, WipeOut wrote:
>> > I have a dir that I can't seem to delete and is giving strange errors..
>> >
>> > [root@dev02 i386]# ls
>> > ls: ??*?: Invalid or incomplete multibyte or wide character
>> > test
>> > [root@dev02 i386]# rm -rf test
>> > rm: cannot remove directory `test': Directory not empty
>> > [root@dev02 i386]# cd test
>> > [root@dev02 test]# ls
>> > ls: : No such file or directory
>> >
>> > Anyone got any super commands for getting rid of a directory that just
>> > will not go?
>>
>> If everything else fails, I recommend using "fsck" to checl the
>> filesystem integrity.
>
>That is a good suggestion.
>
>I've seen the two effects he mentions before. The "test" effect was
>created by an application that figured out how to force a hard link
>of a subdirectory back to its parent a couple parents up the chain.
>It was ugly. However, I do not believe this is necessarily his effect.

Improperly linked directories can indeed have that effect.  If fsck
can't fix the problem, the only reasonable solution is to run 'debugfs'
on the unmounted filesystem and use the "clri" command to zero out the
offending directory's inode.  Then an fsck should clean things up.
Any remaining files and subdirectories that had been in `test' will
end up in lost+found, and a simple 'rm' should work from there.

-- 
Bob Nichols         rnichols@xxxxxxxxxxxxxxx




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux