Use the -exec
option to find
.
$ find -name testname.c -exec vi {} \;
If your find
returns multiple matches, the files will open sequentially. That is, when you close one, it will open the next. You will not get them all in the queue in the buffers.
To make them all open in buffers, use:
$ vi $(find -name testname.c)
Is it really vi, by the way, and not Vim, to which vi is often applied at present?
source share