From owner-freebsd-questions Thu Sep 19 18:58:48 2002 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 E1FCD37B401 for ; Thu, 19 Sep 2002 18:58:47 -0700 (PDT) Received: from bloodwood.adelaide.edu.au (bloodwood.adelaide.edu.au [129.127.43.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6056543E42 for ; Thu, 19 Sep 2002 18:58:43 -0700 (PDT) (envelope-from tpeter01@redtail.its.adelaide.edu.au) Received: from redtail.its.adelaide.edu.au ([129.127.46.157]) by bloodwood.adelaide.edu.au (Netscape Messaging Server 4.15) with ESMTP id H2PS5T00.0WQ; Fri, 20 Sep 2002 11:28:41 +0930 Received: (from tpeter01@localhost) by redtail.its.adelaide.edu.au (8.11.6/8.11.6) id g8K1wTn85780; Fri, 20 Sep 2002 11:28:29 +0930 (CST) (envelope-from tpeter01) Date: Fri, 20 Sep 2002 11:28:29 +0930 From: Tim Peters To: Duncan Anker Cc: freebsd-questions@FreeBSD.ORG Subject: Re: find case-insensitive challenge Message-ID: <20020920015829.GA85636@adelaide.edu.au> References: <200209191353.g8JDrnlA057534@lurza.secnetix.de> <1032476710.2579.8.camel@duncan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1032476710.2579.8.camel@duncan> 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 Fri, Sep 20, 2002 at 09:05:10AM +1000, Duncan Anker wrote: > > > > find foo -type f | grep -i '\.jpg$' | xargs -J % mv % bar > > > > My preferred method also. But ... I can never get that to work if there > are spaces (or other illegal characters) in the file names. > > And no, I don't usually put spaces in my filenames, but I use this quite > frequently behind the scenes on Mac OS X. FYI, find and xargs can work with weird filenames (as long as they don't contain a \0) with these kind of options: find . -print0 | xargs -0 command (although i don't know if OSX has these :) -tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message