Operating System - HP-UX
1748278 Members
4075 Online
108761 Solutions
New Discussion юеВ

Re: cannot delete recursive directory

 
Rasheed Tamton
Honored Contributor

Re: cannot delete recursive directory

Can you post the output:

ncheck -F vxfs /dev/vg??/rlvol?|grep 1233
ll -i /dir |grep 1233

Carme Torca
Super Advisor

Re: cannot delete recursive directory

Here you are,

Thanks,

1233 /lost+found/#1233/.
478465 /lost+found/#1233/core_16237/core_16237/core_16237/.
227910 /lost+found/#1233/core_16237/core_16237/core_16237/core_16237/core_162 37/core_16237/core_16237/core_16237/core_16237/core_16237/.
358858 .../#1233/core_16237/core_16237/core_16237/core_16237/core_16237/core_ 16237/core_16237/core_16237/core_16237/core_16237/core_16237/.
626633 /lost+found/#1233/core_16237/core_16237/core_16237/core_16237/.
677899 /lost+found/#1233/core_16237/core_16237/core_16237/core_16237/core_162 37/.
717773 /lost+found/#1233/core_16237/.
717774 /lost+found/#1233/core_16237/core_16237/core_16237/core_16237/core_162 37/core_16237/.
68427 /lost+found/#1233/core_16237/core_16237/.
751944 /lost+found/#1233/core_16237/core_16237/core_16237/core_16237/core_162 37/core_16237/core_16237/.
797513 /lost+found/#1233/core_16237/core_16237/core_16237/core_16237/core_162 37/core_16237/core_16237/core_16237/.
68428 /lost+found/#1233/core_16237/core_16237/core_16237/core_16237/core_162 37/core_16237/core_16237/core_16237/core_16237/.


$ls -i /disc/lost+found |grep 1233
1233 #1233
Users are not too bad ;-)
Dennis Handly
Acclaimed Contributor

Re: cannot delete recursive directory

Have you tried:
cd /lost+found/#1233/core_16237
cd core_16237/core_16237/core_16237/core_16237
rm -rf .

If the rm fails, repeat the cd to go deeper, then repeat.
James R. Ferguson
Acclaimed Contributor

Re: cannot delete recursive directory

Hi Carmen:

> its anyone to eliminate the lost+found and recreate again??

In the case you describe, you aren't going to be able to remove from this level if you can't remove from a subordinate directory.

That said, for your information, yes. You can recreate the 'lost+found' directory in a filesystem with 'mklost+found'. See the manpages for more information.

Regards!

...JRF...
Peter Nikitka
Honored Contributor

Re: cannot delete recursive directory

Hi,

@Dennis: you can't remove the tree you're sitting on (rm -rf .):
>>>
cd /lost+found/#1233/core_16237
cd core_16237/core_16237/core_16237/core_16237
rm -rf .
<<<
Try instead

cd /lost+found/#1233/core_16237
cd core_16237/core_16237/core_16237/core_16237
rm -rf core_16237

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Dennis Handly
Acclaimed Contributor

Re: cannot delete recursive directory

>Here you are,
1233 /lost+found/#1233/.
478465 /lost+found/#1233/core_16237/core_16237/core_16237/.

It doesn't look like there is a cycle in the directories. It looks like my previous case of some script gone awry.

>Peter: @Dennis: you can't remove the tree you're sitting on (rm -rf .):

Oops, I thought rm(1) would at least try to get the others.

>rm -rf core_16237

Yes or "*" if there is only the one directory there.

Also, if the tree is really deep, you can cd 10s of directories at a time:
DD=core_16237/core_16237/core_16237/core_16237/core_16237
DD20=$DD/$DD/$DD/$DD
cd $DD20