bash: copying files without prompt

It can be annoying that the ‘cp’ command keep prompting if you are to overwrite some files. This is due the cp alias. To fix that,

unalias cp
cp -af source target


Author: bpeh

Bernard Peh is a great passioner of web technologies and one of the co-founder of Website Design and Reviews. He works with experienced web designers and developers everyday, developing and designing commercial websites. He specialises mainly in SEO and PHP programming.

One thought on “bash: copying files without prompt”

  1. Bernard

    you can do that quicker, just put a slash in front and it will unalias:

    \cp source target

    it will not ask you.

Comments are closed.