From owner-freebsd-questions Fri Feb 14 17: 0:46 2003 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 9A1E137B401 for ; Fri, 14 Feb 2003 17:00:44 -0800 (PST) Received: from grebe.mail.pas.earthlink.net (grebe.mail.pas.earthlink.net [207.217.120.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD44743F85 for ; Fri, 14 Feb 2003 17:00:43 -0800 (PST) (envelope-from parv_fm@mailsent.net) Received: from sdn-ap-035dcwashp0433.dialsprint.net ([65.179.105.179] helo=moo.holy.cow) by grebe.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 18jqh6-0005I3-00; Fri, 14 Feb 2003 17:00:42 -0800 Received: by moo.holy.cow (Postfix, from userid 1001) id B12BAB756; Fri, 14 Feb 2003 20:03:27 -0500 (EST) Date: Fri, 14 Feb 2003 20:03:27 -0500 From: parv To: Matthew Hunt Cc: David Banning , questions@FreeBSD.ORG Subject: Re: how to delete a file called ???? Message-ID: <20030215010327.GA65944@moo.holy.cow> Mail-Followup-To: Matthew Hunt , David Banning , questions@FreeBSD.ORG References: <20030212111232.A6759@skytrackercanada.com> <20030212192143.GA7742@moo.holy.cow> <20030212201219.GA84741@wopr.caltech.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030212201219.GA84741@wopr.caltech.edu> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG in message <20030212201219.GA84741@wopr.caltech.edu>, wrote Matthew Hunt thusly... > > On Wed, Feb 12, 2003 at 02:21:43PM -0500, parv wrote: > > > find . -inum $( /bin/ls -i | fgrep '?' | awk '{print $1}' ) -print0 \ > > | xargs -0 rm -f > > I'm going to go out on a limb and guess that the filename does not really > consist of question marks, but rather of unprintable characters that ls > displays as '?'. Hey, OP said that file name consisted of '?'. W/o access to OP's system or due to lacking output of (something like) "ls -B" (FreeBSD 4.7-Release), i rather not guess what-could-be. Me no fs (or people) mind reader. Then again i did write "something like" before the proposed solution (which you omitted from the quote). :) > I recommend finding the inode number of the offending file: > > $ ls -li > total 1 > 1238024 -rw-rw-r-- 1 mph mph 1 Feb 12 12:07 ? > > The inode number in this case is 1238024. Then you can double-check and > delete it with find: > > $ find . -inum 1238024 > ./+ > $ find . -inum 1238024 -delete Exactly my point: use "find -inum" to find the offending file(s) & deal w/ it(them) as appropriate. - parv -- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message