Solution 1:
You can try this: find . -d -name "* " -type d -exec bash -c 'TO=$(echo "{}" | sed "s/.$//"); FROM=$(echo "{}"); mv "${FROM}" "${TO}"' \;
You can try this: find . -d -name "* " -type d -exec bash -c 'TO=$(echo "{}" | sed "s/.$//"); FROM=$(echo "{}"); mv "${FROM}" "${TO}"' \;