Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
1  
Welcome Lam to Ask Ubuntu! I have edited your question, so that it's more readable, and the title is more likely to grab other's attention. –  Rafał Cieślak Feb 21 '13 at 16:06
4  
check your aliasses with the command alias. –  Rinzwind Feb 21 '13 at 16:07
1  
Check the following:1)Have you set an alias for cp in ~/.bash_aliases or ~/.bashrc? 2)You have no folder temp in your current directory, so do you mean /temp? 3) What is the purpose of ~ in your destination? –  i08in Feb 21 '13 at 16:09
2  
Using --remove-destination? ... See man cp. And I would suggest type cp (assuming default Bash) instead of alias, because it could be a function, too. –  0xC0000022L Feb 21 '13 at 16:46

1 Answer 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.

share|improve this answer
    
who told you that? >:) –  Rinzwind Feb 23 '13 at 15:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.