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
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 ..