From owner-freebsd-questions@FreeBSD.ORG Wed Mar 8 17:02:01 2006 Return-Path: X-Original-To: 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 328A616A420 for ; Wed, 8 Mar 2006 17:02:01 +0000 (GMT) (envelope-from dgw@liwest.at) Received: from lilzmailso01.liwest.at (lilzmailso01.liwest.at [212.33.55.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id EC4F543D82 for ; Wed, 8 Mar 2006 17:01:47 +0000 (GMT) (envelope-from dgw@liwest.at) Received: from cm56-136-28.liwest.at ([86.56.136.28] helo=[192.168.1.102]) by lilzmailso01.liwest.at with esmtp (Exim 4.44) id 1FH22k-0001CT-JU; Wed, 08 Mar 2006 18:01:46 +0100 From: Daniela To: Josh Paetzel , questions@freebsd.org Date: Wed, 8 Mar 2006 17:59:45 +0000 User-Agent: KMail/1.5.3 References: <200603081058.10027.josh@tcbug.org> In-Reply-To: <200603081058.10027.josh@tcbug.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200603081759.45078.dgw@liwest.at> X-Spam-Score: -4.9 (----) X-Spam-Report: BAYES_00=-4.9 Cc: Subject: Re: Finding a file with wrong permissions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dgw@liwest.at List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Mar 2006 17:02:01 -0000 On Wednesday 08 March 2006 16:58, Josh Paetzel wrote: > I managed to install a pkg that I created and somehow the file > +COMMENT wasn't created in /var/db/pkg/portname. I touched +COMMENT > in the correct directory because pkg_info was complaining about a > missing +COMMENT. Some time has gone by and I have forgotten which > port it is. Now pkg_info complains: > > pkg_info: show_file: can't open '+COMMENT' for reading > > I'm looking for a way to locate this file. > > #find /var/db/pkg -perm 644 -name +COMMENT | wc -l > 378 > > #pkg_info | wc -l > pkg_info: show_file: can't open '+COMMENT' for reading > 379 > > I've looked through the manpage for find and can't find a 'not' > modifier. Is there an easy way to find a file that doesn't have a > specific permission. ie something like: > > #find /var/db/pkg -perm !644 -name +COMMENT Or you could look for a file with zero size. -- Hope is the worst of all evils, for it prolongs the torments of man.