This is what you do:
cd parent
mv child/* .
rmdir child
If you have files beginning with .
(dot) in the child/
directory, you have to do
shopt -s dotglob
in order for the *
to match them (there are other ways to force this, but setting dotglob
is the easiest).
If child/
contains a file or directory named child
, then you have to either rename that or the directory parent/child
before the mv
operation.