Why is this `cp` command trying to remove files?
I am using Ubuntu 12.04.2 LTS on a Dell 50-50 laptop. Everything went fine until:
[1635][lam@ubuntu:~/bin]$ ll
total 48
-rwxr-xr-x 1 lam lam 232 Jan 27 20:37 demo.sh
-rwxr-xr-x 1 lam lam 34 Aug 26 22:02 encore.sh
-rwxr-xr-x 1 lam lam 94 Nov 13 16:54 esame.sh
-rwxr-xr-x 1 lam lam 156 Jan 20 14:21 ginfo.sh
-rwxr-xr-x 1 lam lam 61 Oct 31 15:56 hello_world.sh
-rwxr-xr-x 1 lam lam 2323 Jan 20 13:36 infoscript
-rwxrwxr-x 1 lam lam 257 Dec 4 17:22 local-variable
-rwxr-xr-x 1 lam lam 16 Jan 28 15:2[1638]
[lam@ubuntu:~/bin]$ cp sayH.sh temp/sayH2.sh~
rm: cannot remove `sayH.sh': No such file or directory
rm: cannot remove `temp/sayH2.sh~': No such file or directory
I am trying to copy a file, yet Ubuntu apparently tries to remove it. Can anybody explain it?
Solution 1:
@rafalcieslak
Thank you for your help.I had searched for the wrong alias(cp=rm -i
) only in bashrc & it was not there. following your advice I tried alias
on CLI & there it was the misfit.
Unaliasing it did it.