Simple file doesn't run (command not found!)

10,144

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:
10,144

Related videos on Youtube

Quazi Irfan
Author by

Quazi Irfan

Updated on September 18, 2022

Comments

  • Quazi Irfan
    Quazi Irfan over 1 year

    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?

  • Quazi Irfan
    Quazi Irfan almost 13 years
    I was already in that directory, why do I need to use ./ that marks relative path?
  • koanhead
    koanhead almost 13 years
    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.