I want to move content of a directory within another directory with the same folders.
Here's an example:
I have ./backup
which has the directories base
and test
. Now, I want to move these directories to ./backupArchives
.
I use this:
mv ./backup/* ./backupArchives
but I got the error
mv: cannot move './backup/base' to './backupsArchive/base': Directory not empty
I tried using --force
, but no luck. Is there a way to move it when folders already exists?
Note: I just want to merge contents, there's no overwriting.
rsync
instead, it will do the merging.mv <folder_name> ~/
from the downloads directory and was getting the error as:mv: cannot move '<folder_name>/' to '/home/user/<folder_name>': Directory not empty
but when i didmv <folder_name> ~/home/
, it worked, Didn't understand what solved the problem here though.