/bin/ls not found, even though it exists!
Having ls and netstat broke on a system sounds suspiciously like something a hacker would do to avoid detection. Usually they try to patch those tools to prevent detection of tools and backdoors they had installed or created. You might want to consider rebooting to a livecd and then checking the md5sums of those files.
If the system is compromised please check these questions for some advice on how to deal with the situation.
- Aftermath of Hack
- Reinstall after a Root Compromise?
You can get the 'No such file or directory' error when the dynamic linker cannot find the appropriate shared objects.
Run:
ldd /bin/ls
and check the output.
Looks suspicious to me as well, by the way. I'd worry about your system having been compromised.
This isn't specifically related to your problem, but if a system doesn't have /bin/ls
installed (i.e., someone has deleted it), you can use:
echo *
to get a directory listing. I have had to use this before, and it's a lifesaver.
Here's the output of stat /bin/ls on my Ubuntu 8.04 server. Different size, so I would guess the file has been corrupted or replaced.
# stat /bin/ls
File: `/bin/ls'
Size: 106176 Blocks: 216 IO Block: 4096 regular file
Device: ca00h/51712d Inode: 3631 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2009-05-21 13:31:51.000000000 -0400
Modify: 2008-04-04 02:44:23.000000000 -0400
Change: 2008-05-29 17:14:25.000000000 -0400