Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Sep 2002 11:28:29 +0930
From:      Tim Peters <tim@lost.net.au>
To:        Duncan Anker <d.anker@au.darkbluesea.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: find case-insensitive challenge
Message-ID:  <20020920015829.GA85636@adelaide.edu.au>
In-Reply-To: <1032476710.2579.8.camel@duncan>
References:  <200209191353.g8JDrnlA057534@lurza.secnetix.de> <1032476710.2579.8.camel@duncan>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020920015829.GA85636>