Why not just echo NON
first and then do your find
, with no need for exec
?
Also I am not sure how you are running find
without specifying a directory to search, so I have added the current directory to search below.
echo 'NON'
find . -type f -empty
The other possible interpretation of your question is that you want to add the string NON
to all zero-length files. You can do that like this.
find . -type f -empty -exec sh -c "echo NON > {}" \;