Rename folder by removing 7 first characters in bash

I had the need to remove from several folders that the same level the first 5 characters recursively.

for i in **; do [[ -d "$i" ]] || continue; mv "$i" "$(echo $i | sed -e 's/^.......//')";done

Leave a Reply