The Unix/Linux dd command is also known as “disk destroyer” if you swap if and of args even once 😭
Replying to @nixCraft@mastodon.social
Think twice before you hit that enter key and keep verified backups
Replying to @nixCraft@mastodon.social
Why don't Unix or Linux developers add safety nets, such as confirmation prompt to the dd command by default? That would save lots of headaches 😅
Replying to @nixCraft@mastodon.social
@nixCraft Putting a trigger lock on my foot-gun is disrespectful to my freedom.
Replying to @nixCraft@mastodon.social
@nixCraft
you're tired and type
rm -rf /temp
but accidentality hit Enter after /
They changed rm
The --preserve-root flag is a safeguard built into modern versions of the rm command to prevent the deletion of the root directory (/). By default, this option is enabled.
Double-check and explicitly set it for added safety.
When --preserve-root is enabled, rm -rf / is blocked
rm: it is dangerous to operate recursively on ‘/’
rm: use — no-preserve-root to override this failsafe
Replying to @raymaccarthy@mastodon.ie
@raymaccarthy @nixCraft I remember when someone had used: rm -f -r ..
Replying to @nixCraft@mastodon.social
@nixCraft They do! If they need guardrails then a wrapper script is used.
Replying to @nixCraft@mastodon.social
@nixCraft Linux commands are designed to be simple and do one thing only in the simplest possible way. Adding safety nets would just make things horrible to script. Always check man dd, before running sudo dd.
Replying to @nixCraft@mastodon.social
@nixCraft Unix is built on the "you asked for it - you got it" principle. It's not Windows.
Replying to @nixCraft@mastodon.social
@nixCraft run lsblk first to check disk sizes to avoid confusion, then check your dd args with care.
Replying to @nixCraft@mastodon.social
It’s a good thing this is hard to do because the i and o keys are so far apart on the keyboard.
Replying to @nixCraft@mastodon.social
@nixCraft If you can't handle freedom, get yourself a CrApple Mac, where your freedom has been taken away completely. Hope you are good in digesting lies 24/7 and being charged for everything, multiple times over.
Replying to @Axel1973@mastodon.social
@Axel1973 dd command works same on macos too 😂 it is universal
Replying to @nixCraft@mastodon.social
@nixCraft you clearly didn't tried it there. and i am not talking about 10+ year old macs