Re: find question
On Thu, Aug 03, 2000 at 10:11:38PM +0400, Alexey Vyskubov wrote:
> > % find `pwd` \( -name "*.log" -o -name "*.aux" \) -exec 'rm {}' ';'
> > find: rm /home/shao/report/main.log: No such file or directory
[snipped Alexey's solution]
It's nice to use xargs together with find. (You probably know this, but
others may not have heard of it yet)
With xargs you can write fairly readable statements as - using the
command line above as example -:
# find $(pwd) -name '*.log' -o name '*.aux' | xargs rm
Using find's -print0 option together with xargs' -0 is nice to deal with
spaces in file names. (Samba shares come to mind :)
Might help someone...
Sven
--
I am the "ILOVEGNU" signature virus. Just copy me to your signature.
This email was infected under the terms of the GNU General Public License.
Reply to: