ddi is a wrapper for dd. It takes all the same arguments, and all it really does is call dd in the background

Related tags

Command-line ddi
Overview

ddi

A safer dd


Introduction

If you ever used dd, the GNU coreutil that lets you copy data from one file to another, then you may have encountered a typical use case: burning an iso file to a USB flashdrive.

This is how a typical dd command intended for this purpose would look like:

$ dd if=image.iso of=/dev/sdc

This command would copy all contents of image.iso into /dev/sdc which we'll assume it's a USB flashdrive in this example. However, it's VERY easy to mess up this command and send the output to a different device:

$ dd if=image.iso of=/dev/sda

Now all your data is gone and you're in tears. Thankfully, this tool exists, although it won't save you from past mistakes.

ddi (or dd-interactive) is a wrapper for dd. It takes all the same arguments, and all it really does is call dd in the background. But, if a device file is detected, you'll get a warning message detailing some information about what you're about to do as seen here:

example

Any kind of response other than "y" will abort the command. If you use dd frequently, you might appreciate not having to worry so much about nuking your entire installation by one typo.

If the command doesn't have the of flag, or the of flag doesn't direct to a block device, then the warning message is ommited and dd will be called without interrumption. This means that ddi can be used as a drop-in replacement for dd with the added benefit of warning you if you're about to commit a potentially destructive action.

Installation

ddi can be installed form the AUR.

$ paru -S ddi-bin

Optionally, there's pre-compiled binaries for download on the release section.

You might also like...
`rusty_regex` takes an input string and produces a `regex` string representing what was provided.

rusty_regex This project provides a binary that takes an input string, and preps it for regex usage, effectively replacing known generics and producin

Is the GIL seeing someone else? How's about repetitively calling and seeing how long it takes to answer?

GIL Knocker pip install gilknocker When you thought the GIL was available, and you find yourself suspecting it might be spending time with another. Yo

Parse command line arguments by defining a struct.

StructOpt Parse command line arguments by defining a struct. It combines clap with custom derive. Documentation Find it on Docs.rs. You can also check

Call is an easy-to-use command tools for remote development.
Call is an easy-to-use command tools for remote development.

Call is an easy-to-use command tools for remote development. It helps you to build remote development easily and elegant. It can work with makefile and justfile.

zero runtime cost default arguments in rust

Default Arguments in Rust Enables default arguments in rust by macro in zero cost. Just wrap function with default_args! and macro with name of functi

call-me-maybe is a small CLI tool to notify you of the completion of a command

call-me-maybe call-me-maybe is a small CLI tool to notify you of the completion of a command By default, the tools consumes stdin for a message's cont

A simple tutorial on how to call a C function from Rust 🦀

How to call a C function from Rust 🦀 ☎️ I was working on a Rust project where we needed to interact with code written in C. I had to learn how to wor

Human numeric sorting program — does what `sort -h` is supposed to do!

hns — Human Numeric Sort v0.1.0 (⏫︎2022-09-20) © 2022 Fredrick R. Brennan and hns Authors Apache 2.0 licensed, see LICENSE. man page Packages hns_0.1.

Parallel iteration of FASTA/FASTQ files, for when sequence order doesn't matter but speed does

Rust-parallelfastx A truly parallel parser for FASTA/FASTQ files. Principle The input file is memory-mapped then virtually split into N chunks. Each c

Comments
  • Any way not to write to a non-existant /dev/ file?

    Any way not to write to a non-existant /dev/ file?

    I am in progress of writing a lot of images to an usb drive. They appear as /dev/sdb on my system.

    I just ran ddi of=/dev/sdb [...] while my usb drive was disconnected and it happily wrote a file there (standard file on my file system). Is there a way to make this error out instead?

    opened by jglauche 9
Releases(v1.0)
Owner
Tomás Ralph
Tomás Ralph
Technically, this does exactly what sleep does but completes much faster!

hypersleep Technically does everything that sleep does but it is "blazingly fast!" For example, $ time sleep 1 real 0m1.005s user 0m0.001s sys

Nigel 4 Oct 27, 2022
Background task processing for Rust applications with Tokio, Diesel, and PostgreSQL.

Async persistent background task processing for Rust applications with Tokio. Queue asynchronous tasks to be processed by workers. It's designed to be

Rafael Carício 22 Mar 27, 2023
Simple, extensible multithreaded background job processing library for Rust.

Apalis Apalis is a simple, extensible multithreaded background job processing library for Rust. Features Simple and predictable job handling model. Jo

null 50 Jan 2, 2023
a simple program that you can scrap, is shit and really simple but is cool.

if you want to run it you need to have installed curl by default scrap youtube, but you can change it, also change the number of threads and run: carg

pai 7 Oct 15, 2021
Command-Line program that takes images and produces the copy of the image with a thin frame and palette made of the 10 most frequent colors.

paleatra v.0.0.1 Command-Line program that takes an image and produces the copy of the image with a thin frame and palette made of the 10 most frequen

Beka Modebadze 24 Dec 29, 2022
Python/Rust implementations and notes from Proofs Arguments and Zero Knowledge study group

What is this? This is where I'll be collecting resources related to the Study Group on Dr. Justin Thaler's Proofs Arguments And Zero Knowledge Book. T

Thor 65 Dec 16, 2022
Really useful hacking tools.

A Remake of Hax in Rust™ - Port-scanner(Powered by nmap) ✅ - URL-Masker ✅ - Phisher(Powered by ZPhisher) ☑️ (WIP ?? ) For Linux Enthusiasts: You need

skyline 4 May 13, 2023
A simple (but really fast!) CLI tool to convert an epub into a text file.

epub_to_txt A simple (but really fast!) CLI tool written in Rust to convert an epub into a text file (in Markdown format). Usage epub_to_txt filename.

Darren Mothersele 3 Jul 30, 2023
parse command-line arguments into a hashmap and vec of positional args

parse command-line arguments into a hashmap and vec of positional args This library doesn't populate custom structs, format help messages, or convert types.

James Halliday 17 Aug 11, 2022
lemmy-help is a emmylua parser as well as a CLI which takes that parsed tree and converts it into vim help docs.

lemmy-help is a emmylua parser as well as a CLI which takes that parsed tree and converts it into vim help docs.

Vikas Raj 117 Jan 3, 2023