Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 May 2009 20:40:21 +0200 (CEST)
From:      Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>
To:        Walt Pawley <walt@wump.org>
Cc:        Polytropon <freebsd@edvax.de>, Zbigniew Szalbot <z.szalbot@lcwords.com>, freebsd-questions@freebsd.org
Subject:   Re: find and searching for specific expression in files
Message-ID:  <alpine.BSF.2.00.0905302039540.19619@wojtek.tensor.gdynia.pl>
In-Reply-To: <p06240823c6471d0dd353@[10.0.0.10]>
References:  <dd6b168d2af9ddbcfc52e5c0397e4d6a.squirrel@relay.lc-words.com> <20090530183239.a6755d97.freebsd@edvax.de> <alpine.BSF.2.00.0905301843550.19030@wojtek.tensor.gdynia.pl> <p06240823c6471d0dd353@[10.0.0.10]>

next in thread | previous in thread | raw e-mail | index | archive | help
> <make-a-list> | while read x; do <pretty-much-whatever> "$x"; done
>
> which should get around the list length limitations and
> provides for doing "extras" between the "do" and the "done".
> Specifically:
>
> find /path/to/files/ -mtime -2 -print | \
> while read x; do grep "expression" "$x"; done

same as -exec

works but forks a process for each single file - slow

-exec and + or xargs do the job



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