Root probably (and wisely!) does not have the current directory (.) in her PATH. Try ./ddrescue (that's dot-slash)
I boot with Knoppix 3.7 and am still learning Linux. I need to clone a hard drive with lots of errors (dd can't handle it). I have obtained the source for GNU ddrescue (not to be confused with dd_rescue, written by Kurt Garloff), written in C++ by Antonio Diaz. http://www.gnu.org/software/ddrescue/ddrescue.html
I had no problems unzipping and untarring the source files, and I was able to './configure' and then 'make' it (in the same directory on my USB flash drive where the source code is stored).
But now I'm having trouble getting ddrescue to run. If I run it from 'Konsole' terminal with this invocation
ddrescue /dev/hdc /dev/hdb testlog
I get the following error: "ddrescue: cannot open input file: permission denied". I think this is because accessing a full drive like hdb or hdc (rather than a partition like hdb1 or hdc2) can only be done from Root.
But when I launch a 'Terminal as Root' window (logging in as root with a password that I set myself) and navigate (cd) to the correct folder with the compiled folder, I am unable to invoke ddrescue...
root@ttyp1[ddrescue-1.0]# ddrescue /dev/hdc /dev/hdb testlog
bash: ddrescue: command not found
What am I doing wrong? Is there another shell that I should be using?
Root probably (and wisely!) does not have the current directory (.) in her PATH. Try ./ddrescue (that's dot-slash)
THANKS!! Using ./ddrescue worked just fine, although I don't really understand why...
I thought that the . (dot) specifies current directory, so ./ddrescue is telling the system to run ddrescue from a subdirectory of the current directory that I'm in?
Yes, "." does mean the current directory. When you use a command that is not in a directory mentioned in PATH
(type "echo $PATH" to see what's in there), then everything you type up to the last "/" is the path to the executable,
the rest is the name of the executable itself. Try playing with the commands "basename" and "dirname".
HTH

GIGABYTE A520M DS3H AC AMD AM4 Motherboard mATX
$59.99
Intel H310 LGA1151 8-9th Gen DDR4 M.2 NVMe mATX Motherboard IO Shield Battery
$54.99
Intel H81 Motherboard M.2 NVMe LGA 1150 mATX w/ IO Shield (Random Slot Color)
$29.90
ASUS B85M-G / B85M-G PLUS LGA1150 DDR3 Micro ATX Motherboard HDMI Support 4thCPU
$45.00
GIGABYTE B365 HD3 LGA1151 Intel 9th Gen motherboard
$59.99
ASUS PRIME B360M-C MicroATX Intel LGA1151 DDR4 HDMI VGA USB RJ-45 Audio
$34.99
ASRock B550M PRO4 AM4 AMD B550 SATA 6Gb/s Micro ATX AMD Motherboard
$76.49
ASRock AMD BC-250 16GB 128GB SSD Used
$220.00
ASRock Z370 Pro4 LGA 1151 Z370 HDMI USB 3.1 2 Ultra M.2 DDR4 ATX Motherboard
$75.00
ASUS PRIME Z490-V Motherboard Intel Z490 10th gen DDR4 LGA 1200 ATX w/ IO Shield
$84.99