From owner-freebsd-questions Wed Feb 12 12:12:24 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 2D08137B401 for ; Wed, 12 Feb 2003 12:12:23 -0800 (PST) Received: from wopr.caltech.edu (wopr.caltech.edu [131.215.103.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9BBD243F3F for ; Wed, 12 Feb 2003 12:12:22 -0800 (PST) (envelope-from mph@wopr.caltech.edu) Received: from wopr.caltech.edu (localhost.caltech.edu [127.0.0.1]) by wopr.caltech.edu (8.12.3/8.12.3) with ESMTP id h1CKCJ3v084844; Wed, 12 Feb 2003 12:12:19 -0800 (PST) (envelope-from mph@wopr.caltech.edu) Received: (from mph@localhost) by wopr.caltech.edu (8.12.3/8.12.3/Submit) id h1CKCJFW084843; Wed, 12 Feb 2003 12:12:19 -0800 (PST) Date: Wed, 12 Feb 2003 12:12:19 -0800 From: Matthew Hunt To: parv Cc: David Banning , questions@FreeBSD.ORG Subject: Re: how to delete a file called ???? Message-ID: <20030212201219.GA84741@wopr.caltech.edu> References: <20030212111232.A6759@skytrackercanada.com> <20030212192143.GA7742@moo.holy.cow> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030212192143.GA7742@moo.holy.cow> User-Agent: Mutt/1.5.1i 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 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 '?'. Note: # Note that ^A is a literal control-A, typed with control-V control-A $ echo > ^A $ ls ? 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 (Note that find displays the name differently from ls. It looks like a bold "+" in my xterm.) -- Matthew Hunt * Inertia is a property http://www.pobox.com/~mph/ * of matter. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message