Find all files ending with ".txt" in the current directory and its subdirectories, and execute the command "sed" to add the prefix "prefix" to the beginning of each line in each file.
find ~ -name "\*.txt" -exec sed "s/^/prefix/g" {} +;