Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a simple script that lists a bunch of EC2 servers and automates me connecting to them. This script lives at ~/bin/ec2 My PATH looks something like:


Whenever I call ec2 I get:

-bash: /Users/rob/ec2: No such file or directory

Unless I give it the full path, then it'll work. If I rename the script to just ec then I can run it from anywhere like expected. Have digits in script names always been a problem like this? I'm on Mac OSX.

share|improve this question
I doubt it's the digit. Does it work if you rename it "ec3"? – Dennis Williamson Apr 7 '10 at 23:23
-bash: /Users/rob/ec2: No such file or directory

and your script lives here: ~/bin/ec2

Is there a file or directory at /Users/rob/ec2 that's not a script?

share|improve this answer

I would look for an alias, a function or a broken symlink. To check the first two, try:

type -a ec2
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.