Shell command to move every subdirectory to the current directory
This is a simple command using find
to move every subdirectory to the current directory, renaming identically named directories if necessary.
find . -mindepth 2 -type d -exec mv -v -t . --backup=numbered -- '{}' +
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow