Find all files with the extension .txt in the current directory and its subdirectories, and move them to the directory /path/to/new/directory/.
find ~ -type f -name '*.txt' -exec mv {} /path/to/new/directory/ \;