Wednesday, May 20, 2026

Linux - ddrescue

The following is a Linux Dictionary word of the day: ddrescue.

GNU ddrescue is a powerful Linux data‑recovery utility that copies data from one block device to another while intelligently handling read errors. Unlike the classic dd command, ddrescue:

  • Skips bad sectors automatically
  • Retries only the damaged areas
  • Uses a log file to track progress
  • Can resume recovery at any time

This makes it ideal for failing HDDs, SSDs, USB drives, SD cards, and corrupted partitions.

1. -d parameter

  • Direct disk access mode
  • Forces ddrescue to bypass the OS cache
  • Reads directly from the hardware

Useful for failing drives where caching may cause delays or hangs

Use when: recovering from physically damaged or unstable disks.

2. -f parameter

  • Force writing to a block device
  • Required when the output target is a raw device (e.g., /dev/sdb)
  • Prevents accidental overwrites by requiring explicit confirmation
  • Use when: cloning disk → disk.

3. -r[n] parameter

Retry bad sectors

  • -r tells ddrescue to retry failed reads
  • -r3 retries 3 times
  • -r0 means no retries
  • -r-1 means retry forever
  • Used when: you want to squeeze every last readable byte from a failing disk.

Here’s a clean, production‑ready ddrescue command:

ddrescue -d -f /dev/mdev /dev/mdev2 ddclone.log

Breakdown:

-d → direct disk access

-f → force writing to block device

/dev/mdev → source disk

/dev/mdev2 → destination disk

ddclone.log → log file tracking recovery progress

Why the log file matters

If the recovery is interrupted, you can resume instantly:

ddrescue -d -f /dev/mdev /dev/mdev2 ddclone.log

ddrescue reads the log and continues exactly where it left off.

Best Practices for Safe Data Recovery

  • Always clone first, never work on the failing disk directly
  • Use a separate physical disk as the destination
  • Keep the log file on a healthy drive
  • Avoid mounting the failing disk
  • Use -r3 or -r5 for moderate retries
  • For severely damaged drives, use -r-1 (infinite retries) cautiously

Compared to other tools, ddrescue stands out because it:

  • Automatically handles bad sectors
  • Optimizes read order for maximum recovery
  • Uses a persistent log file
  • Works on any block device
  • Is fast, reliable, and open‑source
  • For Linux admins, technicians, and digital forensics specialists, ddrescue is simply indispensable.

Key Takeaways

ddrescue is the safest and most efficient Linux tool for disk cloning and recovery

  • Use -d for direct disk access
  • Use -f when writing to block devices
  • Use -r[n] to retry bad sectors
  • Always create and preserve a log file

Sunday, August 24, 2025

Top 25 Lesser-Known Linux Commands Instructor Guide

Top 25 Lesser-Known Linux Commands Instructor Guide

https://www.amazon.com/dp/B0FNLRVBB2/

The following instructor guide reviews lesser known but useful Linux commands. These commands can be utilized for personal, educational, or corporate usage. It is envisioned that the instructor utilizes the material from this guide via a demonstration type format with each command reviewing the format, example, common options and brief pros and cons.

Contents:

Introduction

How to Use and Run Commands

Create Example Txt File

Create Example C File

bind

chage

cowsay

Ctrl+x+e

disown

factor

getconf

getopt

mpstat

mtr

ncdu

nl

nproc

pstree

pv

rev

shuf

ss

stat

strace

tr

tldr

watch

xxd

Conclusion

About the Author

Notes

Saturday, May 31, 2025

Linux Commands for Ethical Hacking Instructor Guide

Linux Commands for Ethical Hacking Instructor Guide

https://www.amazon.com/dp/B0FBFVNWGC/

The following instructor guide reviews core and key Linux commands for ethical hacking. These commands can be utilized for personal, educational, or corporate usage. It is envisioned that the instructor utilizes the material from this guide via a demonstration type format with each command reviewing the format, brief pros and cons and example. Command contents are grouped by high-level subject matter.

Contents:

Introduction

How to Use and Run Commands

Create Example File

Exploitation

Forensics and Analysis

Network Scanning and Enumeration

Vulnerability Assessment Process

Conclusion

About the Author

Notes

Wednesday, May 21, 2025

Linux - dd

The following is a Linux Dictionary word of the day:

dd command for data duplicator which converts and copies a file, writes disk headers and boot based records.

                Note: running this command with the incorrect parameters and data can delete data.

                if parameter for read from file.

                of parameter to write from file.

                Example copy data from sbin/mdev to sbin/mdev2:

                dd if=/sbin/mdev of=/sbin/mdev2


Sunday, December 29, 2024

Linux - Dc

The following is a Linux Dictionary word of the day:

dc command that runs a desk calculator.

+ = option for addition.

- = option for subtraction.

* = option for multiplication.

/ = option for division.

% = option to display reminder of division operation.

c = option to clear the stack.

f = option to display entire contents of the stack.

p = option which prints to the screen the first item in the stack.

Example:

dc

10

f

10

10+p

        









Karaoke Machine with 2 Wireless Microphones,Portable Karaoke Machine for Adults & Kids,Karaoke Microphone with PA System,Karaoke Speaker Supports for TWS,USB,FM,REC,AUX in,TF Card

https://amzn.to/4fYuGMM

As an Amazon Associate, I earn from qualifying purchases.

Friday, December 27, 2024

Linux Sed Instructor Guide

Linux Sed Instructor Guide https://www.amazon.com/dp/B0DRLCPYRK/

In a Linux system, utilizing sed to search as well as to find and replace is an essential part of working in the environment. Therefore, this instructor guide covers the most common ways to use sed. The commands can be utilized for personal, educational, or corporate usage. It is envisioned that the instructor utilizes the material from this guide via a demonstration type format.

Contents:

How to Use and Run Commands:

Create Example File:

Overview of Sed:

Sed Core Examples:

Sed Print Line Examples:

Sed Adding Aspects Examples:

Sed Manipulation of Lines Examples:

Sed Find and Replace Line Examples:

Sed Insert Line Examples:

Sed Updating File Examples:

Sed Line Number Examples:

Sed Line Deletion Examples:

About the Author:

Notes:

Brother P-Touch, PTM95, Handy Label Maker, 9 Type Styles, 8 Deco Mode Patterns, Navy Blue, Blue Gray

https://amzn.to/3VjjVfO

As an Amazon Associate, I earn from qualifying purchases.

Tuesday, December 24, 2024

Linux - Date

The following is a Linux Dictionary word of the day:

date displays or changes the date & time.

-s = parameter for set.

Example: date

Example: Displays the date in the format of mm/dd/yy then the time in the format of hours:minutes:seconds:

date "+DATE: %m/%d/%y%nTIME: %H:%M:%S"

" – starts display line.

+DATE: option to concatenate the word DATE: on the output line.

%m option to display month.

%d option to display date.

%y option to display year.

%n option for a new line.

displays the date in the format as mm/dd/yy.

TIME: option to concatenate word TIME: on the output line.

%H: option for hour.

%M option for minutes.

%S option for seconds

" end of display line.



As an Amazon Associate, I earn from qualifying purchases.