I am using Ubuntu and Arch-based OSs and I have tons of files that I have to rename. I have used this so far.
allfiles=$(find ./ -type f -name "*:*")
echo $allfiles
find ./ -depth -name "* *" -execdir rename 's/ /_/g' "{}" \
It has renamed the main folders, but not the subdirectories.
find
to files only, but then you talk about folders and subfolders. What do you want to rename? Folders only? Files only? Both?