On macOS, the cp -f flag does not actually prevent it from asking for confirmation. In my case, I have cp aliased to nocorrect cp -i, inducing the prompt. Changing the invocation to command cp -f ... forces the shell to use the program instead of any alias that shadow cp.
On macOS, the
cp -f
flag does not actually prevent it from asking for confirmation. In my case, I havecp
aliased tonocorrect cp -i
, inducing the prompt. Changing the invocation tocommand cp -f ...
forces the shell to use the program instead of any alias that shadowcp
.