Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

Problem

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?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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.]

share|improve this answer
    
I was already in that directory, why do I need to use ./ that marks relative path? –  iamcreasy May 23 '11 at 0:11
2  
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

 
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.