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