I have a tree of directories, I need to remove some of them and move all files from these directories one level up.
I know how to do it step by step, but there are thousands of them, so I need to optimize the process.
I look for directories
find . -type d -name 'src' and then I need to move all files from found directories one level up (
root - one -- two --- src - three -- four --- five ---- src
contents of first
src should be moved to
How can I do it with one script?