From owner-freebsd-questions@FreeBSD.ORG Mon Mar 15 20:03:06 2004 Return-Path: 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 8185716A4CE for ; Mon, 15 Mar 2004 20:03:06 -0800 (PST) Received: from mta4.adelphia.net (mta4.adelphia.net [68.168.78.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DA7243D1D for ; Mon, 15 Mar 2004 20:03:06 -0800 (PST) (envelope-from parv_fm@mailsent.net) Received: from moo.holy.cow ([69.160.71.102]) by mta11.adelphia.net (InterMail vM.5.01.06.08 201-253-122-130-108-20031117) with ESMTP id <20040316035701.XLV1438.mta11.adelphia.net@moo.holy.cow>; Mon, 15 Mar 2004 22:57:01 -0500 Received: by moo.holy.cow (Postfix, from userid 1001) id 9B61AA3DC; Mon, 15 Mar 2004 22:57:34 -0500 (EST) Date: Mon, 15 Mar 2004 22:57:34 -0500 From: Parv To: Walter Message-ID: <20040316035734.GC3419@moo.holy.cow> Mail-Followup-To: Walter , 'Questions' References: <405640BE.9000102@earthlink.net> <20040315235943.GA55958@falcon.midgard.homeip.net> <40564606.3020504@earthlink.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40564606.3020504@earthlink.net> cc: 'Questions' Subject: Re: deleting directories with ??? in name X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2004 04:03:06 -0000 in message <40564606.3020504@earthlink.net>, wrote Walter thusly... > > Erik Trulsson wrote: > > > ls(1) by default displays all unprintable characters as question > > marks. To see what the filenames actually are use 'ls -aB'. > > > > To delete files with strange names you can always do a 'rm -i *' > > and answer 'y' only for the weird files. > > 'rm -i *' returns "no match" > 'ls -aB' shows me the file names, but even after carefully typing > in what it shows me in an 'rm' command (name in quotes) says not > found. There are \216, \235, \237, and \377 characters in the > names Use the inodes, find(1) & xargs(1) instead to remove the files... - Use '-i' option of ls(1) to list the inodes of the offending files; note them. These are listed in the most left hand column. # ls -iaB1 - Find(1) the files matching above inodes (assuming evil files are in current directory & inode-1 & inode-2 are the inodes of two nasty files) ... # find . \( -inum -o -inum \) -print0 - Pass the find(1) output to rm(1) ... # find . \( -inum -o -inum \) -print0 \ # | xargs -0 rm -fv - Done ...Read up on ls(1), find(1) & xargs(1). - Parv --