this post was submitted on 23 Jun 2025
49 points (94.5% liked)

Linux

8141 readers
491 users here now

A community for everything relating to the GNU/Linux operating system

Also check out:

Original icon base courtesy of [email protected] and The GIMP

founded 2 years ago
MODERATORS
top 9 comments
sorted by: hot top controversial new old
[–] [email protected] 10 points 6 days ago (2 children)

Huh...

First the site isn't optimised for mobile, those codeblocks are cut off.

Second in the last example why does the author rely on pv when dd has a status flag to display its progress already?

[–] [email protected] 1 points 6 days ago

why does the author rely on `pv` when `dd` has a status flag to display its progress already

Not all versions of `dd` support the status argument. I think it’s particular to GNU. If you’re working in a shop that runs multiple versions of Linux as well as multiple versions of proprietary UNIX then you tend to use the command that works everywhere rather than remember the exceptions for each. (I worked in a place that ran all of RHEL, SLES, Ubuntu, AIX, Solaris, and SCO UNIX).

[–] [email protected] 4 points 6 days ago

The code blocks scroll, but they definitely need to telegraph that better:

[–] [email protected] 6 points 6 days ago (3 children)

I have used dd a few times without destroying my disk, here is my simple recommendation to stay safe:

DON'T TYPE THE COMMAND DIRECTLY INTO THE TERMINAL!

What I mean is that you should open a text editor, type the dd command you want to run in the editor, let it sit for 5 min, go back to the text editor, find the OF path, doublecheck and verify that it is safe.

Correct misstakes, wait another 5 min and do the check again.

Once you are confident that the command is accurate, copy paste it into a terminal and run it.

[–] [email protected] 1 points 6 days ago* (last edited 6 days ago)

Once, while typing a dd command, I realised I was sleepy.
I deferred until next day.


Usually I keep partitionmanager open alongside, to cross-check my device selection.
Unlike having to use other CLI tools to determine if I have it right, I get some handy icons (like the USB drive symbol). Still, make sure to check the contents just in case it got bugged and set the icon to the wrong type of drive.

[–] [email protected] 3 points 6 days ago (1 children)

when I need to type a dangerous command, i prepend it with #, so it's just a comment.

Only when I'm really sure do i go back to the start of the line and remove the #

[–] [email protected] 1 points 6 days ago

That is a very good practice, it is better than my suggestion as it eliminates potential error when copy pasting

[–] [email protected] 11 points 6 days ago

I use dd regularly to back up and restore disk images. It's not particularly hard to use but like sudo rm -rf it absolutely will eat whatever you point it at so you need to understand what the command does and pay attention.

[–] [email protected] 10 points 6 days ago

Disappointing that the article doesn’t seem to answer the question in the title.