From owner-freebsd-questions Wed Feb 12 12:40:55 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 71DDD37B401 for ; Wed, 12 Feb 2003 12:40:53 -0800 (PST) Received: from ei.bzerk.org (ei.xs4all.nl [213.84.67.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id E139E43FA3 for ; Wed, 12 Feb 2003 12:40:49 -0800 (PST) (envelope-from fbsd-q@bzerk.org) Received: from ei.bzerk.org (BOFH@localhost [127.0.0.1]) by ei.bzerk.org (8.12.6/8.12.6) with ESMTP id h1CKgqCT074361; Wed, 12 Feb 2003 21:42:52 +0100 (CET) (envelope-from stable@ei.bzerk.org) Received: (from stable@localhost) by ei.bzerk.org (8.12.6/8.12.6/Submit) id h1CKgpFR074360; Wed, 12 Feb 2003 21:42:51 +0100 (CET) Date: Wed, 12 Feb 2003 21:42:51 +0100 From: Ruben de Groot To: Kent Stewart Cc: parv , David Banning , questions@FreeBSD.ORG Subject: Re: how to delete a file called ???? Message-ID: <20030212204251.GA74324@ei.bzerk.org> References: <20030212111232.A6759@skytrackercanada.com> <20030212192143.GA7742@moo.holy.cow> <200302121145.33271.kstewart@owt.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200302121145.33271.kstewart@owt.com> User-Agent: Mutt/1.4i 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 11:45:33AM -0800, Kent Stewart typed: > On Wednesday 12 February 2003 11:21 am, parv wrote: > > in message <20030212111232.A6759@skytrackercanada.com>, > > wrote David Banning thusly... > > > > > I have a file called ??????????????? > > > > ... > > > > > I can't seem to clean it away. > > > > > > rm ???????? > > > rm '????????' > > > rm "????????" > > > > > > all do not work. > > > > try something like... > > > > find . -inum $( /bin/ls -i | fgrep '?' | awk '{print $1}' ) -print0 > > \ > > > > | xargs -0 rm -f > > > > > That is a lot of work when you could have just > > rm -- ??????????????? This will delete all files that have a name the length of 15 characters. > > The "--" tells rm that what follows is a file name. But first, the ?'s are expanded by the shell to match any file with a name of 15 characters. > > Kent > > -- > Kent Stewart > Richland, WA > > http://users.owt.com/kstewart/index.html > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message