Im trying to use find
to execute all the files under a directory. I have a sed script that will replace all #
with //
.
assume my directory is /path/to/directory
and it contains file1 file2 file3
using find
and sed
: find /path/to/directory -type f -exec sed -f file.sed {} \;
.
how do I make it to where it runs ALL files (file1 file2 file3)
under the path/to/directory
directory?
-exec
is executed from the starting directory, while-execdir
is used to execute commands in the directory where the matching file is found. Seeman find
. Or do you want a third directory to be specified? – FelixJN Sep 29 '20 at 10:30find
ing, executable-files / programs? – ctrl-alt-delor Oct 09 '20 at 16:50