Using a shell script or Terminal, how do I overwrite files that may or may not be present. I looked at man page for cp, it said use the -f argument to force overwrite. But, it does nothing.
$ cp -f /path/to/source/file.txt /path/to/target
Or is there another option to overwrite files using the common in-built command line tools in OS X?