How to force copy in Linux… force cp linux

Most users would expect to run a command like the following:

cp -rf <filename> <filename>

But the “f” option doesn’t always work. The reason is doesn’t always work is because it is aliased. To check what commands are aliased type “alias” at you command line. Please be aware that depending on which user you are logged in as your alias will change based on the user. In order to run a command that is aliased you will need to run it as follows:

/bin/cp -rf <filename> <filename>

By escaping the alias you will be able to use the -f –force option with cp.

[ad#google-468×60]

3 thoughts on “How to force copy in Linux… force cp linux

Leave a Reply

Your email address will not be published. Required fields are marked *

*