For Techs.... Techniques.... Technologies....


Force Switch Not Working For 'cp' Command

1. Run the alias command to check if cp was set to alias with a different command.

# alias

alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'

Here, cp command have alias as 'cp –i'. -i, --interactive, which means prompt before overwrite. Therefore, -f was ignored.

If we need to remove this, run the following command

# unalias cp

Revert the alias set up as it helps to prevent accidental override of files.

# alias cp='cp –i'

Leave a Reply