Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 wrote a very simple script that looks like that:

$ cat
cd log
rm development.log
cd ..
tar zcvf my_tar_ball.tar.gz *

But, it doesn't work:

$ command not found

which bash returns /bin/bash, and is executable:

$ ls -ll 
-rwxrwxr-x 1 misha misha 75 2012-02-04 22:11

What could be the problem?

(BTW, source does work!)

share|improve this question
up vote 4 down vote accepted

If you did not put the scripts directory in your PATH(which is a environment variable), and . (the current directory) is not in the PATH either, you can activate the script like this:

$ ./
share|improve this answer
Ignore my answer, @kev updated their answer To add to kev's answer, the reason why it doesn't work without ./ if front of it is because the current directory is not in $PATH. – lupincho Feb 5 '12 at 11:27

Your Answer


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.