Cannot delete stubborn files - New Hint

Jack Stone antennex at
Sun Jun 4 14:03:06 PDT 2006

>From: Garrett Cooper <youshi10 at>
>To: freebsd-questions at
>Subject: Re: Cannot delete stubborn files - New Hint
>Date: Sun, 4 Jun 2006 13:37:37 -0700
>On Jun 4, 2006, at 12:57 PM, Jack Stone wrote:
>>>From: "Jack Stone" <antennex at>
>>>To: wmoran at
>>>CC: freebsd-questions at
>>>Subject: Re: Cannot delete stubborn files
>>>Date: Sun, 04 Jun 2006 14:52:01 -0500
>>>>From: Bill Moran <wmoran at>
>>>>To: "Jack Stone" <antennex at>
>>>>CC: freebsd-questions at
>>>>Subject: Re: Cannot delete stubborn files
>>>>Date: Sun, 4 Jun 2006 14:40:22 -0400
>>>>"Jack Stone" <antennex at> wrote:
>>>> > >From: Chris Hill <chris at>
>>>> > >To: Jack Stone <antennex at>
>>>> > >CC: freebsd-questions at
>>>> > >Subject: Re: Cannot delete stubborn files
>>>> > >Date: Sun, 4 Jun 2006 09:39:51 -0400 (EDT)
>>>> > >
>>>> > >On Sun, 4 Jun 2006, Jack Stone wrote:
>>>> > >
>>>> > >>I have 2 files that resists all efforts to delete them.
>>>> > >
>>>> > >[...]
>>>> > >
>>>> > >>Here are the files and the error message:
>>>> > >>rm: local/lib/perl5/5.6.1/mach/Sys/ Operation not  
>>>> > >>rm: local/lib/perl5/5.6.1/mach/Sys/ Operation not  
>>>> > >
>>>> > >Make sure the files do not have the system immutable flag set:
>>>> > >
>>>> > ># chflags noschg local/lib/perl5/5.6.1/mach/Sys/
>>>> > ># chflags noschg local/lib/perl5/5.6.1/mach/Sys/
>>>> > >
>>>> > >...and then see if you can't delete them. I don't know why the  flag 
>>>> > >be set, but it's something to try.
>>>> > >
>>>> > >HTH.
>>>> > >
>>>> > >--
>>>> > >Chris Hill               chris at
>>>> >
>>>> > Chris: Tried that at the very first. No joy!
>>>>If flags and permissions are all set so that the files should  delete, 
>>>>they still don't, reboot the system into single user mode and  fsck the
>>>>I had this happen a number of years ago.  We had dirty power and  the 
>>>>would reboot on occasion during brownout.  We finally got UPS on  the 
>>>>but months later we had files that wouldn't delete.  The only way  we 
>>>>got rid of them was to reboot in single user and fsck.  I expect  the 
>>>>suffered some subtle corruption during an unclean boot and it  took time
>>>>before we noticed.
>>>>Another option would be to use fstat to make sure nothing has the  files 
>>>>Bill Moran
>>>Hi, Bill: Yes, tried all of that before and again no joy -- very  
>>>A free cigar to anyone who solves this one!
>>Since I learned I could "mv" the directory that contains the 2  files, I 
>>tried to move it to another partition, figuring I had a  solution IF I 
>>could only do that.
>>Here's the new error when I tried to move the directory from "/"  to /usr
>>mv: /bin/rm: terminated with 1 (non-zero) status: Cross-device link
>>Does this new hint stike any bells?
>	I assume that you tried deleting this as root? Sometimes files have  been 
>resistant to my deleting them unless I am root, even when I'm  the owner.
>	Have you also tried doing something to the file to write to it, like  cat 
>or echo? My theory is that maybe if you did that then tried to  delete the 
>file, it will work because you flushed the previous  information and closed 
>the file properly.
>	Best of luck,

Good suggest & I thought you had the answer. I was able to write to the 
(zero bytes) file with cat and it took the new bytes. But, still can't 

BTW: Have the permissions set to 777 too.

How to find that "crosslink" and break it is the issue I guess.

The mystery continues.....


Don’t just search. Find. Check out the new MSN Search!

More information about the freebsd-questions mailing list