I have 2 folder: - /Desktop/old- /Desktop/newIn old folder, I have following file:- olda.txt- oldb.txtIn new folder, I have following file:- newa.txt- newb.txt- newc.txtAnd I want to overwrite the file from old to new. And I tried like this: mv /home/user/Desktop/old /home/user/Desktop/newI get the below output in new folder:- old- newa.txt- newb.txt- newc.txtWhat I want is like this:- olda.txt (from old/olda.txt)- oldb.txt (from old/oldb.txt)- newc.txtHow should I write in order to get it?
Overwrite file from old folder to new folder
mv
You just moved the folder itself inside the new folder. Just use:mv /home/user/Desktop/old/* /home/user/Desktop/new