Asked • 05/06/19

How to force cp to overwrite without confirmation?

I'm trying to use the `cp` command and force an overwrite. I have tried `cp -rf /foo/* /bar`, but I am still prompted to confirm each overwrite.

1 Expert Answer

By:

Zach K. answered • 10/18/21

Tutor
3.8 (5)

Senior Linux Systems Administrator

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.