How to copy a file and replace (if necessary) in the target directory from terminal
First things first, -R is used for recursive copying, which won't do anything for a single file. 

cp default behavior is to overwrite the existing file. 

cp test.txt ~/Library/Folder\ 1/Folder\ 2/


The backslash is used to stop the string being split on the spaces.