- To: Slug List <slug@xxxxxxxxxxx>
- Subject: Re: [SLUG] find -exec cp {} current-directory.messages
- From: Jamie Wilkinson <jaq@xxxxxxxxxxxxxx>
- Date: Wed May 23 11:36:02 2001
- Reply-to: Some Linux Users Group <slug@xxxxxxxxxxx>
- User-agent: Mutt/1.3.17i
This one time, at band camp, Terry Collins said:
>Is there a way of telling find to copy a file in the directory where it
>finds it?
>
>I'm trying to run find . -name files.bbs -exec cp {} .messages \;
>but this just copies each files.bbs into .message in the directory where
>the command is run, rather than the directories where each files.bbs
>exists
find . -name 'files.bbs' -exec cp {} `dirname {}`/.messages \;
--
jamesw
<Jaq> what's wrong with the default? :)
<jdub> It is poopie.