Find all files in the current directory (and its subdirectories) whose name matches the pattern '*', and execute the command 'sed -i 's/ $//g' {} +' on each of them.
find . -iname '*' -exec sed -i 's/ $//g' {} +