Find all files ending with .txt in the current directory and its subdirectories, and for each of them, execute the command "sed -i 's/^/prefix:/g'", replacing the {} with the file name.
find ~ -name '*.txt' -exec sed -i 's/^/prefix:/g' {} \;