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

Cisco Nexus N9K-C92160YC-X 48P 25GbE SFP28 6P QSFP+/QSFP28 PE Switch
$439.00
Cisco WS-C3650-12X48UR-L 48-Port Stackable Layer 3 8x10G SFP+ Port Switch
$129.99
Cisco Acacia DP04QSDD-E25-840 400G QSFP-DD Coherent DCO Transceiver Module
$699.99
Cisco Catalyst C9120AXI-B Wi-Fi 6 Access Points
$30.00
NEW Cisco Meraki MS130-48P-HW 48-Port Gigabit PoE+ Cloud Manage Switch UNCLAIMED
$2999.99
Cisco | N3K-C3232C | 32-Port 100G QSFP Network Switch W/ 2x PSU, 2x Power Cords
$240.00
Cisco C3850-NM-2-10G Catalyst 3850 2 x 10GE Network Module
$30.00
Cisco C9300-48UXM-A Switch 9300 Series 48-port UPoE Network
$874.99
Cisco Catalyst C9130AXI-B WiFi 6 802.11ax Wireless Access Point Brand New
$101.99
Cisco XFP-10G-MM-SR 10G XFP Transceiver
$79.89