How to flatten directory tree using 'find' on Linux

You can use the following command to recursively move all files from subdirectories to the current directory. The information of the original directory structure will be lost, however files with the same name in different directories will NOT be overwritten due to mv --backup=numbered:

find . -type f -depth -exec mv {} --backup=numbered $(pwd) -v \;

This command does the following: