From owner-freebsd-questions@FreeBSD.ORG Wed Oct 19 19:32:41 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 696DC1065674 for ; Wed, 19 Oct 2011 19:32:41 +0000 (UTC) (envelope-from wodfer@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id E58768FC13 for ; Wed, 19 Oct 2011 19:32:40 +0000 (UTC) Received: by bkbzu17 with SMTP id zu17so3279777bkb.13 for ; Wed, 19 Oct 2011 12:32:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=HB0igYhiO9oK+C03leORKLHDg5f7XkrLpPjhQGqOyec=; b=mFQLKJnO9YNBEQq402azxvllFR2WaxXr88GwteDOLHA5Zj7y53cIX3noajD8CBvZhC tG55Y4DsHX1O+TiLQGH/3Ub+eMw9u4b3Bcbbf8O6qrsC4fqeztGYdWa6JjUt36lG/2kY v2wC5ISLUi/pARtEs2uwbZR9xYPePAVJVJtLI= MIME-Version: 1.0 Received: by 10.223.76.201 with SMTP id d9mr12999244fak.12.1319052759608; Wed, 19 Oct 2011 12:32:39 -0700 (PDT) Received: by 10.152.11.42 with HTTP; Wed, 19 Oct 2011 12:32:39 -0700 (PDT) In-Reply-To: <201110191904.p9JJ4Ago092104@mail.r-bonomi.com> References: <201110191904.p9JJ4Ago092104@mail.r-bonomi.com> Date: Wed, 19 Oct 2011 21:32:39 +0200 Message-ID: From: Andy Wodfer To: freebsd-questions Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Help! Can't delete files ... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 19:32:41 -0000 On Wed, Oct 19, 2011 at 9:04 PM, Robert Bonomi wrote: > A) learn to use wildcards. > I know how to use wildcards, but I forgot to tell in my first email that there are 4 files that have almost the same filenames, so I couldn't do it this way. > B) learn to use the '-i' option to rm > C) learn to use 'echo' to 'test' filename expansions. > Thanks! Very useful info. For your 'problem' files, put a '?' in anywhere there is a space or a > 'strange character'. Check what happens using echo, then use 'rm -i', so > you make sure that you delete *only* the particular file you intend to. > > e.g. for the specific file you cited above try: > > echo 28b?Kjoepesenter?n?ringsg?rdeier.docx > > *ASSUMING* that that shows; > 28b Kjoepesenter n<91>ringsg<86>rdeier.docx > > then try: > rm -i 28b?Kjoepesenter?n?ringsg?rdeier.docx > > Assuming that it asks yout about deleting the full file name, type a 'y'. > > Repeat for each 'problem' file. Thanks a lot! That did it! :-) Cheers, Andy