Is there a good way to alias the command
cp file1 file2 to
cp -i file1 file2?
Apologies if this is a dumb question, I'm a Unix novice.
You should put an alias in your start up script:
You can put this directly in
and when I have added/changed things to that file I do
If you do
shell functions are more powerful, but for simple things where aliases suffice.
If you are using bash, the answers by Anthon and michas will work fine. However, if you are using csh or tcsh, the command to add will be
and you will add it in your
Put this line in your shell startup script. (probably ~/.bashrc)