Use find -type fto find only files matching the name .*and exclude directories .and ... -maxdepth 1prevents return findto subdirectories. Then you can use -execto execute commands sedusing {}the placeholder, to tell findwhere should be the names of the files.
find . -type f -maxdepth 1 -name '.*' -exec sed -i.bakkk -e "s#/sa/#/he/#g" {} +
-exec xargs, , — , "foo bar\nfile" . find -print0 | xargs -0
find . -type f -maxdepth 1 -name '.*' -print0 | xargs -0 sed -i.bakkk -e "s#/sa/#/he/#g"
. , , , (, , 99% ).