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?
aliasses
with the commandalias
.cp
in~/.bash_aliases
or~/.bashrc
? 2)You have no foldertemp
in your current directory, so do you mean /temp? 3) What is the purpose of~
in your destination?--remove-destination
? ... Seeman cp
. And I would suggesttype cp
(assuming default Bash) instead ofalias
, because it could be a function, too.