Find all files in the current directory (and its subdirectories) with a ".txt" extension, and for each of those files, execute the command "sed -i '' -e 's/^/#/g' {}," which will add a "#" character to the beginning of each line.
find ./ -name "*.txt" -exec sed -i '' -e 's/^/#/g' {} \;