bash flatten directory code example Example: bash flatten directory find /dir1 -mindepth 2 -type f -exec mv -t /dir1 -i '{}' +