Date: 20 Sep 2002 09:05:10 +1000 From: Duncan Anker <d.anker@au.darkbluesea.com> To: freebsd-questions@FreeBSD.ORG Subject: Re: find case-insensitive challenge Message-ID: <1032476710.2579.8.camel@duncan> In-Reply-To: <200209191353.g8JDrnlA057534@lurza.secnetix.de> References: <200209191353.g8JDrnlA057534@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2002-09-19 at 23:53, Oliver Fromme wrote: > > In general, it is a good idea to try to avoid -exec, because > it is inefficient. -exec runs the specified command for every > single file, whilch can be terribly slow if there are a lot of > files. Better use xargs instead, which will collect multiple > filenames and execute the command fewer times. > > This also enables you to use grep to filter the file names in > a more sophisticated way than find itself can do: > > 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. 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?1032476710.2579.8.camel>