From owner-freebsd-questions@FreeBSD.ORG Fri Oct 14 18:56:02 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 408F216A41F for ; Fri, 14 Oct 2005 18:56:02 +0000 (GMT) (envelope-from drew@mykitchentable.net) Received: from relay02.roc.ny.frontiernet.net (relay02.roc.ny.frontiernet.net [66.133.182.165]) by mx1.FreeBSD.org (Postfix) with ESMTP id 905E243D5F for ; Fri, 14 Oct 2005 18:55:56 +0000 (GMT) (envelope-from drew@mykitchentable.net) Received: from filter01.roc.ny.frontiernet.net (filter01.roc.ny.frontiernet.net [66.133.183.68]) by relay02.roc.ny.frontiernet.net (Postfix) with ESMTP id 41E47370286 for ; Fri, 14 Oct 2005 18:55:55 +0000 (UTC) Received: from relay02.roc.ny.frontiernet.net ([66.133.182.165]) by filter01.roc.ny.frontiernet.net (filter01.roc.ny.frontiernet.net [66.133.183.68]) (amavisd-new, port 10024) with LMTP id 29154-06-62 for ; Fri, 14 Oct 2005 18:55:55 +0000 (UTC) Received: from blacklamb.mykitchentable.net (67-51-164-214.dsl1.elk.ca.frontiernet.net [67.51.164.214]) by relay02.roc.ny.frontiernet.net (Postfix) with ESMTP id CB5EF370364 for ; Fri, 14 Oct 2005 18:55:39 +0000 (UTC) Received: from [165.107.42.123] (unknown [165.107.42.123]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by blacklamb.mykitchentable.net (Postfix) with ESMTP id E72821549FD for ; Fri, 14 Oct 2005 11:55:38 -0700 (PDT) Message-ID: <434FFEB4.90308@mykitchentable.net> Date: Fri, 14 Oct 2005 11:53:40 -0700 From: Drew Tomlinson User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: FreeBSD Questions Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-2.3.2 (20050629) at filter01.roc.ny.frontiernet.net Subject: Help With Find Syntax 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: Fri, 14 Oct 2005 18:56:02 -0000 I want to recursively search a directory and return files that end in ".jpg" or ".gif" but I can't seem to get the find syntax right. My basic command lines are: find /multimedia/Pictures -iname "*.gif" -print OR find /multimedia/Pictures -iname "*.jpg" -print Both of these work perfectly. But I can't figure out how to combine the two. 'man find' tells me the the OR operator is '-or'. Thus it seems that some incantation along this line would work: $ find /multimedia/Pictures -iname "*.gif" -or "*.jpg" -print find: paths must precede expression Usage: find [path...] [expression] I've tried various placement of quotes, parenthesis, etc. but can't seem to find the right way to do this. Can someone show me my error? Thanks, Drew -- Visit The Alchemist's Warehouse Magic Tricks, DVDs, Videos, Books, & More! http://www.alchemistswarehouse.com