From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28966 invoked from network); 31 Oct 2006 13:26:03 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.7 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 31 Oct 2006 13:26:03 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 14665 invoked from network); 31 Oct 2006 13:25:53 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 31 Oct 2006 13:25:53 -0000 Received: (qmail 6716 invoked by alias); 31 Oct 2006 13:25:43 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10910 Received: (qmail 6695 invoked from network); 31 Oct 2006 13:25:41 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 31 Oct 2006 13:25:41 -0000 Received: (qmail 13339 invoked from network); 31 Oct 2006 13:25:41 -0000 Received: from mail.gmx.net (213.165.64.20) by a.mx.sunsite.dk with SMTP; 31 Oct 2006 13:25:34 -0000 Received: (qmail invoked by alias); 31 Oct 2006 13:25:34 -0000 Received: from dslb-084-057-202-209.pools.arcor-ip.net (EHLO [172.24.100.23]) [84.57.202.209] by mail.gmx.net (mp031) with SMTP; 31 Oct 2006 14:25:34 +0100 X-Authenticated: #286618 Message-ID: <45474ECD.7040309@gmx.de> Date: Tue, 31 Oct 2006 14:25:33 +0100 From: =?ISO-8859-1?Q?Heinrich_G=F6tzger?= User-Agent: Thunderbird 1.5.0.7 (X11/20060917) MIME-Version: 1.0 To: zsh-users@sunsite.dk Subject: Re: 'mv' all files containing a certain string to a sub-directory References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 zzapper wrote: > Hi > I want to 'mv' all files containing a certain string to a sub-directory. > Should be trivial but cant think how w/o creating a temporary file > > > Are you looking for smth like: find . -type f -exec grep -e "a certain string" {} \; -exec mv {} tmp \; HTH Heinrich