If I use mv to move a folder called folder to a directory that already contains folder will they merge or will it be replaced?
Merging folders with mv?
directory;rename
mv cannot merge or overwrite directories, it will fail with the message mv: cannot move 'a' to 'b': Directory not empty, even when you're using the --force option.You can however use rsync with the --remove-source-files option (and possibly others) to merge one directory into another.rsync won't delete any directories, so you will have to do something like find -type d -empty -delete afterwards to get rid of the empty source directory tree.