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 Z370P D3 ATX Z370 LGA1151 Motherboard (Support Intel 6/7th 8th 9th)
$59.99
ASRock B550M Pro SE AM4 DDR4 SATA 6Gb/s 1 PCIe 4.0 x16 Micro ATX Motherboard
$84.99
ASUS H110M-R Motherboard Intel 6th/7th Gen LGA1151 DDR4 Micro-ATX i/o shield
$42.00
Asus H81M-C Intel LGA1150 DDR3 Desktop Motherboard MicroATX Socket H3
$23.99
Asus Prime H310M-A R2.0 Intel LGA 1151 DDR4 Desktop Motherboard
$54.99
ASRock H170 Pro4S Motherboard ATX Intel H170 LGA1151 DDR4 SATA3 HDMI
$39.99
GIGABYTE GA-H110MSTX-HD3 H110 DP LGA1151 I-SERIES MAX-32GB DDR4 MINI-STX W/IO
$24.95
Asus Prime A320M-K mATX AM4 Motherboard (Ryzen 1000-5000 Ready)
$49.99
Gigabyte M-ATX motherboard with Intel Core i3 8100 CPU and 8GB DDR4 RAM
$84.00
ASUS B85M-E Motherboard Intel B85 (4th Gen) LGA1150 DDR3 microATX
$39.99