Ddrescue-helper.sh – A bash script for GNU ddrescue
ddrescue-helper.sh is a bash script to make running GNU ddrescue easier. Do you have a spinning drive with read errors that you can't access?\ Do you need to rescue a drive, partition, or file from read errors? ddrescue-helper.sh might be useful. This is a pure bash script that hooks you up to the majesty that is GNU ddrescue, and makes it more useful. For Linux and macOS. Rescue... - device-to-device - device-to-file (image) - file-to-file Consistency checks help avoid user mistakes, such as trying to place the domain map on a target device, or targeting the boot drive. Auto persistent…
In plain words
Ddrescue-helper.sh is a bash script that simplifies data recovery from drives with read errors on Linux and macOS. It wraps GNU ddrescue to handle device-to-device, device-to-file, and file-to-file rescues while incorporating safety checks to prevent common mistakes like targeting the wrong drive. The script automatically manages unmounting via fstab, organizes domain maps and logs, and can generate reports identifying files affected by read errors on supported filesystems including NTFS and ext2.
written from the facts on this page · September 2026
From the sources
In the maker’s words, at launch
ddrescue-helper.sh is a bash script to make running GNU ddrescue easier. Do you have a spinning drive with read errors that you can't access?\ Do you need to rescue a drive, partition, or file from read errors? ddrescue-helper.sh might be useful. This is a pure bash script that hooks you up to the majesty that is GNU ddrescue, and makes it more useful. For Linux and macOS. Rescue... - device-to-device - device-to-file (image) - file-to-file Consistency checks help avoid user mistakes, such as trying to place the domain map on a target device, or targeting the boot drive. Auto persistent un-mount via /etc/fstab ensures rescue integrity. Ddrescue's domain-map file and read-rate logs are placed in a directory named by the user. Once you have a ddrescue domain map, a REPORT function lists files affected by read errors and slow-reads for supported filesystems...\ Linux: NTFS, ext2/3/4, HFS+\ macOS: HFS+. Making a device or file copy is the best way to rescue. But if you need to work in situ with a filesystem or file that contains bad blocks, this helper offers a ZAP function that uses the domain map to write device blocks with read errors to attempt to make the blocks readable. This can regain access to an unreadable file, or make an un-mountable filesystem accessible, aiding further forensics (the data in the bad blocks are gone, but gaining device access may still be valuable). An -K option allows ZAP of 4K blocks, for advanced format drives, instead of the default 512-byte block. This option may encourage the drive to re-allocate a bad sector. (ZAP doesn't rely on hdparm, it uses dd(1) to target single blocks.) A PLOT function uses gnuplot to render the GNU ddrescue read-rate log as a simple graph at the terminal, helping you assess device health. By rescuing (COPYING) to /dev/null instead of a proper destination, you can SCAN a source to create the domain-map and read-rate log without replicating to another device. This lets you REPORT, ZAP, and PLOT a source without need for a target device-- maybe you don't have a spare. If nothing else, a bit assistance running GNU ddrescue might be just the ticket. DOCUMENTATION: - The github README.md - Built-in help. (-h) - A LinkedIn article describing the helper's use: https://www.linkedin.com/feed/update/urn:li:activity:7177497... — WARNING! This script has so far only been tested by me and mistakes due to maker myopia are likely. Plus bash is a can'o'worms! While I believe this helper is not fundamentally dangerous, try it in a situation that's low stakes to start. There's a time for disaster later. Also try to overlook that a huge bash script seems like an epic security hazard. If something goes wrong, you should've voted for Kodos. — I would appreciate laments about the approach and code. The github README.md contains thoughts about many concerns & improvements.\ (see TODOs at the end.) I think the most gross part of this script is the mainline option processing, so pointers to idioms for smarter option processing will be appreciated. But beat me over the head in any way you like. I am a github noob so I have no idea how collaboration works over there, but I'm ready to learn. — I truly enjoy the nightmare that is the Unix shell. So I have no intention of rewriting this in a more palatable language. I just wanted to hack together a tool to help me work with failing drives and this script took on a life of its own. Blame these guys: AT&T The UNIX System: Making Computers More Productive (1982) https://www.youtube.com/watch?v=tc4ROCJYbm0 I like to think that old K & R and KenT would have only dreamed of shell utility that is this byzantine. With any luck this code will soon be polluting a LLM.
Does the same job
all alternatives →- CSChecksum.sh verify every install script2022 · checksum.sh · ▲119
The pattern of downloading and executing installation scripts without verifying them has bothered me for a while. I started messing around with a way to verify the checksum of scripts before I execute them. I've found it a really useful tool for installing things like Rust or Deno. It's written entirely as a shell script, and it's easy to read and understand what's happening. I hope it may be useful to someone else!
- BUBaxx – Unix-friendly backup service2019 · txt.black · ▲424
- DADut – a fast Linux disk usage calculator2024 · codeberg.org · ▲396
"dut" is a disk usage calculator that I wrote a couple months ago in C. It is multi-threaded, making it one of the fastest such programs. It beats normal "du" in all cases, and beats all other similar programs when Linux's caches are warm (so, not on the first run). I wrote "dut" as a challenge to beat similar programs that I used a lot, namely pdu[1] and dust[2]. "dut" displays a tree of the biggest things under your current directory, and it also shows the size of hard-links under each directory as well. The hard-link tallying was inspired by ncdu[3], but I don't like how unintuitive the…


- PSPu.sh – a full coding-agent harness in 400 lines of shellApr 2026 · pu.dev · ▲92
I originally was just messing with pi-autoresearch. Gave it a sample task to build the most portable coding agent. First cut was 6 KB of shell. Great for one-shots, unusable interactively. I was shocked it actually worked. Started building up -- adding features — but with a self-imposed rule: no new dependencies, and sub 500 LOC. This thing had to be truly portable. Just sh, curl, awk. System primitives only. Which means I did some genuinely disgusting things in awk, including JSON parsing and the OpenAI Responses tool loop with reasoning items carried across turns. It's now ~400 lines. In…
More life & fun this month
the category →- TL
Life & fun · 10d ago · louisabraham.github.io



Photosynthesis fires two of your iPhone
Life & fun · 29d ago · photosynthesis.camera
- CCCreatium Coach▲320
Your multimedia mentor that takes you from mid to great
Life & fun · 11d ago · producthunt.creatium.info
SoloUno▲310Take control of hair pulling, nail biting & skin picking
Life & fun · 28d ago · solouno.io