How to move (and overwrite) all files from one directory to another?
It's just mv srcdir/* targetdir/
.
If there are too many files in srcdir
you might want to try something like the following approach:
cd srcdir
find -exec mv {} targetdir/ +
In contrast to \;
the final +
collects arguments in an xargs
like manner instead of executing mv
once for every file.
mv -f source target
From the man page:
-f, --force
do not prompt before overwriting