From owner-freebsd-questions@FreeBSD.ORG Sat May 30 09:26:19 2009 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 C76B0106566B for ; Sat, 30 May 2009 09:26:19 +0000 (UTC) (envelope-from z.szalbot@lcwords.com) Received: from relay.lc-words.com (relay.lc-words.com [62.121.130.110]) by mx1.freebsd.org (Postfix) with ESMTP id 6FC888FC21 for ; Sat, 30 May 2009 09:26:19 +0000 (UTC) (envelope-from z.szalbot@lcwords.com) Received: from localhost (localhost [127.0.0.1]) by relay.lc-words.com (Postfix) with ESMTP id 18AB6B8031 for ; Sat, 30 May 2009 11:25:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lcwords.com; s=mainlcwords; t=1243675513; bh=rcbQekuq8SLSuQvS7FW9AtCMCUazPtmbzDmFATmy+BI=; h=Message-ID:Date:Subject:From:To:MIME-Version:Content-Type: Content-Transfer-Encoding; b=H2hB4JJjhaNblJcccMKMjhZKgfDxVIlxqfPjjwcjWhOzWEfDSg3irqniStm8rOFo5 7w+UUxzjnajtMi0mARjYtBd1X5RvU7AQ36Ohzaa8Nrhv77f2ltKRPjLhXQm8pZKt+s Mr5WRH3rTuOs7nofuuZq0h+Eoh+ixrd7DU59gLd4= Received: from relay.lc-words.com ([127.0.0.1]) by localhost (relay.lc-words.com [127.0.0.1]) (amavisd-maia, port 10024) with ESMTP id 91295-06 for ; Sat, 30 May 2009 11:25:12 +0200 (CEST) Received: from relay.lc-words.com (localhost [127.0.0.1]) by relay.lc-words.com (Postfix) with ESMTP id CD24BB8029 for ; Sat, 30 May 2009 11:25:12 +0200 (CEST) Received: from 77.254.184.81 (SquirrelMail authenticated user z.szalbot@lcwords.com) by relay.lc-words.com with HTTP; Sat, 30 May 2009 11:25:12 +0200 Message-ID: Date: Sat, 30 May 2009 11:25:12 +0200 From: "Zbigniew Szalbot" To: freebsd-questions@freebsd.org User-Agent: SquirrelMail/1.4.19 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-2 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: find and searching for specific expression in 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: Sat, 30 May 2009 09:26:20 -0000 Hello, Can you please give me a hint how to use find to search for a specific text within files? I am using find in the following manner: find /path/to/files/ -mtime -2 -ls |less to find files which have been recently modified. But I would like to extend the search to find specific expression within files. -name is used to specify file name. How can I search for strings within text? It is probably in the man but I somehow overlook it. :( Thank you very much in advance! -- Zbigniew Szalbot