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

128GB (4x32GB) SK hynix DDR4 PC4-2666V RDIMM ECC Server Ram HMA84GR7CJR4N-VK
$799.00
Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram 2x 550W PSU No HDD
$275.00
867959-B21 HPE ProLiant DL360 G10 CTO Server W/ 2x 865414-B21 1x 840140-001
$245.00
Microsoft Windows Server 2022 Standard 64Bit 16 Core-50 CALs DVD With Key&
$69.90
Gigabyte 4U AI Server 10x Nvidia GPU 2x Xeon Gold 6150 36 Core 2.7GHz DDR4 RAM
$1499.00
Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2680 v3 | 32gb Ram | 2x 1600W
$409.99
Dell Poweredge R730xd 12LFF 2*2660v4 4*1Gbe h730 2x 750W Server CTO
$308.00
Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2690 v3 | 64gb Ram | 2x 1600W
$524.99
Dell PowerEdge R530 2x E5-2630v4 H330 iDRAC8 Port Card Riser No PSU/RAM/HDD
$99.99
Dell PowerEdge FX2s + 8x FC430 Blades 16x E5-2630v4 160 Cores Rails No PSU/RAM
$699.00