Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jun 2003 10:14:33 -0400
From:      Bill Moran <wmoran@potentialtech.com>
To:        Jaime <jaime@snowmoon.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: bad file descriptor
Message-ID:  <3EEF2249.5000205@potentialtech.com>
In-Reply-To: <20030617090348.G94567@malkav.snowmoon.com>
References:  <20030617090348.G94567@malkav.snowmoon.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Jaime wrote:
> 	Can anyone explain this?  It looks like I can't delete a given
> file.  This file has been causing weird errors with just about everything,
> including tar, rm, ls -l, etc.  It resides on a vinum RAID-5 array, which
> is the only strange thing I can think of about it.
> 
> zeus# ls
> #pico29506#                     .login                          .shrc                           cdtashirt.jpg
> .addressbook                    .login_conf                     .spamassassin                   cdtashirtstitch.jpg
> .addressbook.lu                 .mail_aliases                   December 2002 Newsletter.docs   dead.letter
> .aspell.en.prepl                .mailrc                         Documents                       mail
> .aspell.en.pws                  .pinerc                         Lawrence.JPG                    mbox
> .aspell.english.prepl           .profile                        October 2002 Newsletter.doc     public_html
> .aspell.english.pws             .qmail.backup.from.cyrus        October 2002 Newsletter.doc.
> .cshrc                          .rhosts                         acker
> zeus# rm "#pico29506#"
> rm: #pico29506#: Bad file descriptor
> zeus# whoami
> root

That looks like a recovery file from the pico editor.

It's unlikely, but possible that your system crashed during a pico
editing session and left this file behind with a broken file
descriptor.  If such is the case, fsck might be able to fix it.
Try unmounting the filesystem (or booting into single user mode
if you must) and running 'fsck -f'.  Once it's finished and you've
rebooted the system, see if you can then delete the file.

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EEF2249.5000205>