in reply to Moving files recursively to new subfolder

what's wrong with simply doing:
cp -r dir1 dir2 rm -rf dir1 mkdir dir1

Replies are listed 'Best First'.
Re^2: Moving files recursively to new subfolder
by jayu_rao (Sexton) on May 29, 2015 at 04:02 UTC
    Will not rm -rf dir1 delete the contents of dir2 because it is a subfolder within dir1?