Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This is a really odd bug I can't seem to figure it out. Basically, commands like ls can see all the files in the current directory, however when I go to execute the file it will give errors like "file not found", even when it most obviously is.

alt text

If you look at my command history in the screenshot, you can see I can ls into a directory and see it's contents. When I try to run the file, I get the "no such file or directory" error.

However, if I type simply 'vm', I can't use tab completion to complete the directory name, and my third command is me typing 'vm' and hitting tabtab, it lists a bunch of vmware specific tools instead of the subdirectory name. I can then ls and see my current directory contents, and it will list only the single subdirectory. However, then I tried to use the full filepath from root to run the file, still to no avail. If anyone has any insight, it would be much appreciated.

FYI it's Ubuntu Server 10.04 inside VMWare Workstation.

share|improve this question
    
As current dir (or your HOME dir in this case) is not in PATH , vm TAB TAB will not expand it. ./vm TAB TAB will do –  Joakim Elofsson Sep 10 '10 at 15:29
add comment

2 Answers 2

up vote 3 down vote accepted

The fact that the filename is listed in red tells me that it's likely a broken symlink.

If you do ls -l vmware-tools-distrib/vmware-install.pl you'll probably see something like:

lrwxrwxrwx 1 user group   10 2010-09-10 10:19 vmware-install.pl -> non-existent-target
share|improve this answer
    
This is correct, thank you. When I ran the installer the first time, it did not complete successfully, but it managed to change the link the install was file pointed to to a non-existent uninstall file. I thought I could just re-run the install after installing the necessary libraries, but apparently not. Thanks. –  tj111 Sep 10 '10 at 15:32
add comment

When you try to execute a command, bash searches for that command in PATH. The current working directory is usually not included in PATH for security reasons (to avoid Trojan horse attacks). To execute a command in the current directory, precede its name with ./, e.g.,

./vmstat

EDIT: Never mind--didn't read question carefully.

share|improve this answer
add comment

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.