I have two folders
/var/second/app. I have different files within both folders and few are same. I want to merge
/var/first/app. How can I do that?
You may first backup your destination folder (just in case) :
cp -r /var/first/app /var/first/app.backup
If you don't care overwriting files :
cp -fr /var/second/app /var/first/app
It will copy recursively the second folder into the first one, overwriting files with same names.
If you don't want to overwrite existing files :
cp -nr /var/second/app /var/first/app
If all is ok, you can remove the backup :
rm -rf /var/first/app.backup