Find all files in the current directory (and its subdirectories) and rename them by replacing all non-word characters (e.g. punctuation, spaces, etc.) with underscores.
find ./ -iname '*' -exec rename 's/[^\w]/_/g' {} +