View Full Version : [SOLVED] ls bash error

April 7th, 2012, 04:56 AM
I don't remember what I type at the terminal I only remember that at the end I put ls, so after that I got an error, so then I copy the ls bash file from another ubuntu and put it on a usb drive and then copy the file to my other ubuntu, but now I get this error>>>

:~$ ls
bash: /bin/ls: cannot execute binary file

need some help to solved this problem.

April 7th, 2012, 05:37 AM
Why did you do that ? Binaries of one installation may not be compatible to other installation .
Once I had accidentally deleted a very important binary file on a HP-UX box then tried to get it from a similar installation .But that did not work .I had to retrieve it from an older tar backup of one of bins .

still you can execute permissions to ls and give it a try .

chmod a+x /bin/ls

April 7th, 2012, 06:53 AM
same error

April 7th, 2012, 10:31 AM
sudo apt-get install --reinstall coreutils

worked when I deleted the rm command

April 7th, 2012, 02:50 PM
terminal >

type -t ls

output please.

April 7th, 2012, 04:00 PM
I try

sudo apt-get install --reinstall coreutils

Problem solved thanks I also try -t ls and got back in return "alias"

thanks for the information.