[clue-tech] question on commands

Ski Dawg skidawg at skidawg.org
Fri Mar 11 06:58:46 MST 2005


On Thu, 2005-03-10 at 18:25 -0700, David Anselmi wrote:
> $ find -name filename -exec vi {} \;
> 
> Using -exec starts grep once for each file (a fork/exec each time).
<snip>
> For vi I would say the same.  For Jeff's case he may expect only one 
> file from find.  But if he gets more than one and uses -exec, he'll vi 
> the first, quit, vi the next, quit, so on.  A pain if he gets a lot of 
> files.

If I am understanding this correctly, I don't think this is quite right,
at least when using vim, instead of classic vi. When using vim with the
-exec of find, it will open one instance of vim and put each found file
into a different buffer. You can then use :bn (next buffer), :bp
(previous buffer) and :bd (close current buffer) to navigate through the
different files that were found.

--
Doug

Registered Linux User #285548 (http://counter.li.org)
----------------------------------------
Random Thought:
Quack!
	Quack!! Quack!!




More information about the clue-tech mailing list