Here in the screen shot, there is a window and terminal open.


I am running on Ubuntu 10.04(kernel 2.6) LTS 64bit LiveCD session, and trying to run testDisk to recover my another formatted partition.

But, whenever I run the

sudo testdisk_static

command, it says, command not found!

As you can see in the picture, this file(testdisk_static) exists. if i double click it nothing happens. Its not running from terminal either.

Why this file doesn't run? What to do in this situation?


Since testdisk_static is not in your $PATH, you need to specify the path for it to run.

You can use a relative path if you are in the same directory: sudo ./testdisk_static

or you can specify the absolute path from any working directory: sudo /media/Foxtrot\ Bravo/testdisk-6.12/testdisk_static [Note: the backslash after Foxtrot is important to escape the space that follows.]

  • I was already in that directory, why do I need to use ./ that marks relative path? May 23 '11 at 0:11
  • 3
    You need to do that because bash searches the paths found in $PATH. Bash has no way to guess that you want the command in the current directory unless you tell it so explicitly with ./ - this is necessary so that you can run other commands (like ls, cd, et al) from wherever you happen to be.
    – koanhead
    May 23 '11 at 1:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.