CP overwrite files in destination

Although the copy program cp in Linux overwrites without prompting, in practice, it does not, the reason behind that is that the command is aliased with the (cp -i), you can check that by using the alias command

So there are 2 solutions to this to make cp overwrite

The first would be to unalias, while the second would be to execute the command directly with

\cp

Or you can use the full path to the alias command like

/usr/bin/cp

I personally use

\cp this that

Leave a Reply

Your email address will not be published.