From owner-freebsd-questions@FreeBSD.ORG Sun Jun 4 18:40:24 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7A7ED16A4E9 for ; Sun, 4 Jun 2006 18:40:24 +0000 (UTC) (envelope-from wmoran@collaborativefusion.com) Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1059343D49 for ; Sun, 4 Jun 2006 18:40:23 +0000 (GMT) (envelope-from wmoran@collaborativefusion.com) Received: from localhost (monrovll-cuda1-24-53-251-44.pittpa.adelphia.net [24.53.251.44]) (AUTH: LOGIN wmoran, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Sun, 04 Jun 2006 14:40:23 -0400 id 00056413.44832917.0000AEAB Date: Sun, 4 Jun 2006 14:40:22 -0400 From: Bill Moran To: "Jack Stone" Message-Id: <20060604144022.160fbc26.wmoran@collaborativefusion.com> In-Reply-To: References: <20060604093513.X56404@tripel.monochrome.org> Organization: Collaborative Fusion X-Mailer: Sylpheed version 1.0.6 (GTK+ 1.2.10; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Cannot delete stubborn files X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jun 2006 18:40:24 -0000 "Jack Stone" wrote: > >From: Chris Hill > >To: Jack Stone > >CC: freebsd-questions@freebsd.org > >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/Hostname.pm: Operation not permitted > >>rm: local/lib/perl5/5.6.1/mach/Sys/Syslog.pm: Operation not permitted > > > >Make sure the files do not have the system immutable flag set: > > > ># chflags noschg local/lib/perl5/5.6.1/mach/Sys/Hostname.pm > ># chflags noschg local/lib/perl5/5.6.1/mach/Sys/Syslog.pm > > > >...and then see if you can't delete them. I don't know why the flag would > >be set, but it's something to try. > > > >HTH. > > > >-- > >Chris Hill chris@monochrome.org > > Chris: Tried that at the very first. No joy! If flags and permissions are all set so that the files should delete, and they still don't, reboot the system into single user mode and fsck the partition. I had this happen a number of years ago. We had dirty power and the system would reboot on occasion during brownout. We finally got UPS on the system, but months later we had files that wouldn't delete. The only way we finally got rid of them was to reboot in single user and fsck. I expect the disk 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 open. HTH. -- Bill Moran Six men came to kill me one time, and the best of them carried this. It's a Callahan fullbore autolock, customized trigger and double cartridge thourough-gage. It's my very favorite gun. Jayne Cobb