Find all files in the current directory (and its subdirectories) whose name contains any characters, and replace all non-alphanumeric characters with underscores using the sed command.
find . -iname "*.*" | xargs sed -i 's/[^[:alnum:]]/_/g'