cp command prompts on overwrite even with -f

Maybe your cp command is an alias? Try:

\cp -uf file folder/

yes | cp <whatever else>

Type "type cp" to see where it points, or if it is aliased.


Use full path to cp , it will override the alias

/usr/bin/cp -u --force /home/oldfolder/*.jpg /home/newfolder/