When you copy a file using the command you used:
$ cp /home/dsg/Downloads/sbt-launch-0.7.4.jar ~/bin
different things happen depending on what the target is.
1) ~/bin is a directory
The file will be copied into the ~/bin directory keeping the original name of the file.
2) ~/bin is a regular file
The file ~/bin will be overwritten by the source file.
3) ~/bin does not exist
The source file will be copied to the destination name creating a new file.
By default the ~/bin directory doesn't exist, so unless you created a directory at some time in the past called ~/bin then option 3 will be what happened. If there was a ~/bin in existance, then for the cp command to overwrite it it must have been a regular file and not a directory.
You should delete the ~/bin file and create a directory with:
$ rm ~/bin
$ mkdir ~/bin
Then you can copy the jar file into it with the same command you used before.
(Thanks to @grawity and @garyjohn on whose comments to the question this answer was based upon.)
~/bindoes not exist. You must have created it yourself.rm -f ~/bin && mkdir ~/bin– u1686_grawity Mar 22 '11 at 05:51rm ~/binandmkdir ~/bin, and now when I do a copy the file is moved into the directory as you say. – dsg Mar 22 '11 at 06:10